Class SplittingFlushStrategy
java.lang.Object
io.servicetalk.transport.netty.internal.SplittingFlushStrategy
- All Implemented Interfaces:
FlushStrategy
Deprecated.
This class will be removed in the future releases.
A
FlushStrategy that splits writes into logical write boundaries and manages flush state across those logical
write boundaries. Actual flush logic is delegated to an externally provided (and updatable) FlushStrategy.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.This interface will be removed in the future releases.Nested classes/interfaces inherited from interface io.servicetalk.transport.netty.internal.FlushStrategy
FlushStrategy.FlushSender, FlushStrategy.WriteEventsListener -
Constructor Summary
ConstructorsConstructorDescriptionSplittingFlushStrategy(FlushStrategy delegate, SplittingFlushStrategy.FlushBoundaryProvider boundaryProvider) Deprecated.Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionapply(FlushStrategy.FlushSender sender) Deprecated.Every time a new write that requires custom flushes is initiated, this method is invoked.booleanDeprecated.Returnstrueif pending writes, if any, MUST be flushed when the connection is not writable.updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider) Deprecated.Updates theFlushStrategythat is used for flushing each delineated write boundary.voidupdateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider, int boundariesTillCancel) Deprecated.Updates theFlushStrategythat is used for flushing each delineated write boundary.
-
Constructor Details
-
SplittingFlushStrategy
public SplittingFlushStrategy(FlushStrategy delegate, SplittingFlushStrategy.FlushBoundaryProvider boundaryProvider) Deprecated.Create a new instance.- Parameters:
delegate-FlushStrategyto use for flushing each delineated write boundary.boundaryProvider-SplittingFlushStrategy.FlushBoundaryProviderto provideSplittingFlushStrategy.FlushBoundaryProvider.FlushBoundaryto delineate writes.
-
-
Method Details
-
apply
Deprecated.Description copied from interface:FlushStrategyEvery time a new write that requires custom flushes is initiated, this method is invoked. PassedFlushStrategy.FlushSenderis used tosignalto the connection that writes should now be flushed.- Specified by:
applyin interfaceFlushStrategy- Parameters:
sender-FlushStrategy.FlushSenderto signal flushes to the connection.- Returns:
FlushStrategy.WriteEventsListenerthat would listen to write events on the connection for which custom flushes are required.
-
shouldFlushOnUnwritable
public boolean shouldFlushOnUnwritable()Deprecated.Description copied from interface:FlushStrategyReturnstrueif pending writes, if any, MUST be flushed when the connection is not writable.This method is expected to be idempotent.
- Specified by:
shouldFlushOnUnwritablein interfaceFlushStrategy- Returns:
trueif pending writes, if any, MUST be flushed when the connection is not writable.
-
updateFlushStrategy
public Cancellable updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider) Deprecated.Updates theFlushStrategythat is used for flushing each delineated write boundary.- Parameters:
strategyProvider-NettyConnectionContext.FlushStrategyProviderto provide theFlushStrategyto use.- Returns:
- A
Cancellablethat will cancel this update.
-
updateFlushStrategy
public void updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider, int boundariesTillCancel) Deprecated.Updates theFlushStrategythat is used for flushing each delineated write boundary. This update will automatically be cancelled after it has been applied toboundariesTillCanceldelineated write boundaries.- Parameters:
strategyProvider-NettyConnectionContext.FlushStrategyProviderto provide theFlushStrategyto use.boundariesTillCancel- Number of delineated write boundaries to apply this flush on.
-