All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opensearch.migrations.replay.datahandlers.TransformedPacketReceiver Maven / Gradle / Ivy

There is a newer version: 0.2.0.4
Show newest version
package org.opensearch.migrations.replay.datahandlers;

import org.opensearch.migrations.replay.datatypes.ByteBufList;
import org.opensearch.migrations.replay.util.TrackedFuture;

import io.netty.buffer.ByteBuf;

public class TransformedPacketReceiver implements IPacketFinalizingConsumer {

    public final ByteBufList packets = new ByteBufList();

    @Override
    public TrackedFuture consumeBytes(ByteBuf nextRequestPacket) {
        packets.add(nextRequestPacket);
        return TrackedFuture.Factory.completedFuture(null, () -> "TransformedPacketReceiver.consume...");
    }

    @Override
    public TrackedFuture finalizeRequest() {
        return TrackedFuture.Factory.completedFuture(packets, () -> "TransformedPacketReceiver.finalize...");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy