public class DefaultHttp2StreamRemovalPolicy extends ChannelHandlerAdapter implements Http2StreamRemovalPolicy, Runnable
Http2StreamRemovalPolicy
that periodically runs garbage collection on streams that have
been marked for removal.Http2StreamRemovalPolicy.Action
ChannelHandler.Sharable, ChannelHandler.Skip
Constructor and Description |
---|
DefaultHttp2StreamRemovalPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
handlerAdded(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
void |
handlerRemoved(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
void |
markForRemoval(Http2Stream stream)
Marks the given stream for removal.
|
void |
run()
Runs garbage collection of any streams marked for removal >
GARBAGE_COLLECTION_INTERVAL nanoseconds ago. |
void |
setAction(Http2StreamRemovalPolicy.Action action)
Sets the removal action.
|
bind, channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, isSharable, read, userEventTriggered, write
public void handlerAdded(ChannelHandlerContext ctx) throws Exception
ChannelHandlerAdapter
handlerAdded
in interface ChannelHandler
handlerAdded
in class ChannelHandlerAdapter
Exception
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception
ChannelHandlerAdapter
handlerRemoved
in interface ChannelHandler
handlerRemoved
in class ChannelHandlerAdapter
Exception
public void setAction(Http2StreamRemovalPolicy.Action action)
Http2StreamRemovalPolicy
setAction
in interface Http2StreamRemovalPolicy
public void markForRemoval(Http2Stream stream)
Http2StreamRemovalPolicy
Http2StreamRemovalPolicy.Action
.markForRemoval
in interface Http2StreamRemovalPolicy
public void run()
GARBAGE_COLLECTION_INTERVAL
nanoseconds ago.Copyright © 2008–2015 The Netty Project. All rights reserved.