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
-
-
Constructor Summary
Constructors Constructor Description StatsHandler(AggServerHttpRequestStats singleGetStats, AggServerHttpRequestStats multiGetStats, AggServerHttpRequestStats computeStats)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
ServerStatsContext
getNewStatsContext()
long
getRequestStartTimeInNS()
ServerStatsContext
getServerStatsContext()
void
setMetadataRequest(boolean metadataRequest)
void
setMisroutedStoreVersionRequest(boolean misroutedStoreVersionRequest)
void
setRequestInfo(RouterRequest request)
void
setRequestSize(int requestSizeInBytes)
void
setRequestTerminatedEarly()
void
setResponseStatus(io.netty.handler.codec.http.HttpResponseStatus status)
void
setStoreName(java.lang.String name)
void
write(io.netty.channel.ChannelHandlerContext ctx, java.lang.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
-
-
-
-
Constructor Detail
-
StatsHandler
public StatsHandler(AggServerHttpRequestStats singleGetStats, AggServerHttpRequestStats multiGetStats, AggServerHttpRequestStats computeStats)
-
-
Method Detail
-
getNewStatsContext
public ServerStatsContext getNewStatsContext()
-
setResponseStatus
public void setResponseStatus(io.netty.handler.codec.http.HttpResponseStatus status)
-
setStoreName
public void setStoreName(java.lang.String name)
-
setMetadataRequest
public void setMetadataRequest(boolean metadataRequest)
-
setRequestTerminatedEarly
public void setRequestTerminatedEarly()
-
setRequestInfo
public void setRequestInfo(RouterRequest request)
-
setRequestSize
public void setRequestSize(int requestSizeInBytes)
-
getRequestStartTimeInNS
public long getRequestStartTimeInNS()
-
getServerStatsContext
public ServerStatsContext getServerStatsContext()
-
setMisroutedStoreVersionRequest
public void setMisroutedStoreVersionRequest(boolean misroutedStoreVersionRequest)
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, java.lang.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
-
-