Package com.linkedin.venice.listener
Class StatsHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
com.linkedin.venice.listener.StatsHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
public class StatsHandler
extends io.netty.channel.ChannelDuplexHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Constructor Summary
ConstructorDescriptionStatsHandler
(AggServerHttpRequestStats singleGetStats, AggServerHttpRequestStats multiGetStats, AggServerHttpRequestStats computeStats) -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelRead
(io.netty.channel.ChannelHandlerContext ctx, Object msg) long
void
setMetadataRequest
(boolean metadataRequest) void
setMisroutedStoreVersionRequest
(boolean misroutedStoreVersionRequest) void
setRequestInfo
(RouterRequest request) void
setRequestSize
(int requestSizeInBytes) void
void
setResponseStatus
(io.netty.handler.codec.http.HttpResponseStatus status) void
setStoreName
(String name) void
write
(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
StatsHandler
public StatsHandler(AggServerHttpRequestStats singleGetStats, AggServerHttpRequestStats multiGetStats, AggServerHttpRequestStats computeStats)
-
-
Method Details
-
getNewStatsContext
-
setResponseStatus
public void setResponseStatus(io.netty.handler.codec.http.HttpResponseStatus status) -
setStoreName
-
setMetadataRequest
public void setMetadataRequest(boolean metadataRequest) -
setRequestTerminatedEarly
public void setRequestTerminatedEarly() -
setRequestInfo
-
setRequestSize
public void setRequestSize(int requestSizeInBytes) -
getRequestStartTimeInNS
public long getRequestStartTimeInNS() -
getServerStatsContext
-
setMisroutedStoreVersionRequest
public void setMisroutedStoreVersionRequest(boolean misroutedStoreVersionRequest) -
channelRead
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws VeniceException - Specified by:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classio.netty.channel.ChannelDuplexHandler
- Throws:
VeniceException
-