Search in sources :

Example 1 with TrackedConnection

use of io.pravega.segmentstore.server.host.handler.TrackedConnection in project pravega by pravega.

the class AppendTest method createChannel.

static EmbeddedChannel createChannel(StreamSegmentStore store) {
    ServerConnectionInboundHandler lsh = new ServerConnectionInboundHandler();
    EmbeddedChannel channel = new EmbeddedChannel(new ExceptionLoggingHandler(""), new CommandEncoder(null, MetricNotifier.NO_OP_METRIC_NOTIFIER), new LengthFieldBasedFrameDecoder(MAX_WIRECOMMAND_SIZE, 4, 4), new CommandDecoder(), new AppendDecoder(), lsh);
    lsh.setRequestProcessor(AppendProcessor.defaultBuilder().store(store).connection(new TrackedConnection(lsh)).nextRequestProcessor(new PravegaRequestProcessor(store, mock(TableStore.class), lsh)).build());
    return channel;
}
Also used : AppendDecoder(io.pravega.shared.protocol.netty.AppendDecoder) CommandDecoder(io.pravega.shared.protocol.netty.CommandDecoder) ServerConnectionInboundHandler(io.pravega.segmentstore.server.host.handler.ServerConnectionInboundHandler) PravegaRequestProcessor(io.pravega.segmentstore.server.host.handler.PravegaRequestProcessor) ExceptionLoggingHandler(io.pravega.shared.protocol.netty.ExceptionLoggingHandler) TrackedConnection(io.pravega.segmentstore.server.host.handler.TrackedConnection) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) CommandEncoder(io.pravega.shared.protocol.netty.CommandEncoder) LengthFieldBasedFrameDecoder(io.netty.handler.codec.LengthFieldBasedFrameDecoder)

Aggregations

EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)1 LengthFieldBasedFrameDecoder (io.netty.handler.codec.LengthFieldBasedFrameDecoder)1 PravegaRequestProcessor (io.pravega.segmentstore.server.host.handler.PravegaRequestProcessor)1 ServerConnectionInboundHandler (io.pravega.segmentstore.server.host.handler.ServerConnectionInboundHandler)1 TrackedConnection (io.pravega.segmentstore.server.host.handler.TrackedConnection)1 AppendDecoder (io.pravega.shared.protocol.netty.AppendDecoder)1 CommandDecoder (io.pravega.shared.protocol.netty.CommandDecoder)1 CommandEncoder (io.pravega.shared.protocol.netty.CommandEncoder)1 ExceptionLoggingHandler (io.pravega.shared.protocol.netty.ExceptionLoggingHandler)1