Package com.linkedin.venice.listener
Class StorageReadRequestHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- com.linkedin.venice.listener.StorageReadRequestHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
@Sharable public class StorageReadRequestHandler extends io.netty.channel.ChannelInboundHandlerAdapter
StorageReadRequestHandler
will take the incoming read requests from routerRouterRequest
, and delegate the lookup request to a thread poolexecutor
, which is being shared by all the requests. Especially, this handler will execute parallel lookups forMultiGetRouterRequestWrapper
.
-
-
Constructor Summary
Constructors Constructor Description StorageReadRequestHandler(VeniceServerConfig serverConfig, java.util.concurrent.ThreadPoolExecutor executor, java.util.concurrent.ThreadPoolExecutor computeExecutor, StorageEngineRepository storageEngineRepository, ReadOnlyStoreRepository metadataStoreRepository, ReadOnlySchemaRepository schemaRepository, IngestionMetadataRetriever ingestionMetadataRetriever, ReadMetadataRetriever readMetadataRetriever, DiskHealthCheckService healthCheckService, StorageEngineBackedCompressorFactory compressorFactory, java.util.Optional<ResourceReadUsageTracker> optionalResourceReadUsageTracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelRead(io.netty.channel.ChannelHandlerContext context, java.lang.Object message)
java.util.concurrent.CompletableFuture<ReadResponse>
handleMultiGetRequest(MultiGetRouterRequestWrapper request)
java.util.concurrent.CompletableFuture<ReadResponse>
handleSingleGetRequest(GetRouterRequest request)
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
StorageReadRequestHandler
public StorageReadRequestHandler(VeniceServerConfig serverConfig, java.util.concurrent.ThreadPoolExecutor executor, java.util.concurrent.ThreadPoolExecutor computeExecutor, StorageEngineRepository storageEngineRepository, ReadOnlyStoreRepository metadataStoreRepository, ReadOnlySchemaRepository schemaRepository, IngestionMetadataRetriever ingestionMetadataRetriever, ReadMetadataRetriever readMetadataRetriever, DiskHealthCheckService healthCheckService, StorageEngineBackedCompressorFactory compressorFactory, java.util.Optional<ResourceReadUsageTracker> optionalResourceReadUsageTracker)
-
-
Method Detail
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext context, java.lang.Object message) throws java.lang.Exception
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
handleSingleGetRequest
public java.util.concurrent.CompletableFuture<ReadResponse> handleSingleGetRequest(GetRouterRequest request)
-
handleMultiGetRequest
public java.util.concurrent.CompletableFuture<ReadResponse> handleMultiGetRequest(MultiGetRouterRequestWrapper request)
-
-