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 interface
Deprecated.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.boolean
Deprecated.Returnstrue
if pending writes, if any, MUST be flushed when the connection is not writable.updateFlushStrategy
(NettyConnectionContext.FlushStrategyProvider strategyProvider) Deprecated.Updates theFlushStrategy
that is used for flushing each delineated write boundary.void
updateFlushStrategy
(NettyConnectionContext.FlushStrategyProvider strategyProvider, int boundariesTillCancel) Deprecated.Updates theFlushStrategy
that 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
-FlushStrategy
to use for flushing each delineated write boundary.boundaryProvider
-SplittingFlushStrategy.FlushBoundaryProvider
to provideSplittingFlushStrategy.FlushBoundaryProvider.FlushBoundary
to delineate writes.
-
-
Method Details
-
apply
Deprecated.Description copied from interface:FlushStrategy
Every time a new write that requires custom flushes is initiated, this method is invoked. PassedFlushStrategy.FlushSender
is used tosignal
to the connection that writes should now be flushed.- Specified by:
apply
in interfaceFlushStrategy
- Parameters:
sender
-FlushStrategy.FlushSender
to signal flushes to the connection.- Returns:
FlushStrategy.WriteEventsListener
that would listen to write events on the connection for which custom flushes are required.
-
shouldFlushOnUnwritable
public boolean shouldFlushOnUnwritable()Deprecated.Description copied from interface:FlushStrategy
Returnstrue
if pending writes, if any, MUST be flushed when the connection is not writable.This method is expected to be idempotent.
- Specified by:
shouldFlushOnUnwritable
in interfaceFlushStrategy
- Returns:
true
if pending writes, if any, MUST be flushed when the connection is not writable.
-
updateFlushStrategy
public Cancellable updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider) Deprecated.Updates theFlushStrategy
that is used for flushing each delineated write boundary.- Parameters:
strategyProvider
-NettyConnectionContext.FlushStrategyProvider
to provide theFlushStrategy
to use.- Returns:
- A
Cancellable
that will cancel this update.
-
updateFlushStrategy
public void updateFlushStrategy(NettyConnectionContext.FlushStrategyProvider strategyProvider, int boundariesTillCancel) Deprecated.Updates theFlushStrategy
that is used for flushing each delineated write boundary. This update will automatically be cancelled after it has been applied toboundariesTillCancel
delineated write boundaries.- Parameters:
strategyProvider
-NettyConnectionContext.FlushStrategyProvider
to provide theFlushStrategy
to use.boundariesTillCancel
- Number of delineated write boundaries to apply this flush on.
-