public final class FlushStrategyHolder
extends java.lang.Object
FlushStrategy
and allow it to be updated atomically using
updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider)
.Constructor and Description |
---|
FlushStrategyHolder(FlushStrategy flushStrategy)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
FlushStrategy |
currentStrategy()
Returns the current value of the enclosed
FlushStrategy . |
Cancellable |
updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider)
Updates
FlushStrategy enclosed in this FlushStrategyHolder . |
public FlushStrategyHolder(FlushStrategy flushStrategy)
flushStrategy
- Initial FlushStrategy
to use.public FlushStrategy currentStrategy()
FlushStrategy
.FlushStrategy
.public Cancellable updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider)
FlushStrategy
enclosed in this FlushStrategyHolder
.strategyProvider
- NettyConnectionContext.FlushStrategyProvider
to provide a new
FlushStrategy
.
NettyConnectionContext.FlushStrategyProvider.computeFlushStrategy(FlushStrategy, boolean)
MAY be invoked multiple times for a single call to this method and is expected to be idempotent.Cancellable
that will cancel this update.