org.opensearch.migrations.replay.datahandlers.TransformedPacketReceiver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trafficReplayer Show documentation
Show all versions of trafficReplayer Show documentation
Everything opensearch migrations
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...");
}
}