public static class BackpressureStrategy.CallbackBackpressureStrategy extends Object implements BackpressureStrategy
BackpressureStrategy.CallbackBackpressureStrategy, BackpressureStrategy.WaitResult| Constructor and Description |
|---|
CallbackBackpressureStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancelCallback()
Callback to execute when the listener is cancelled.
|
void |
interruptWait()
Interrupt waiting on the listener to change state.
|
protected void |
readyCallback()
Callback to execute when the listener becomes ready.
|
void |
register(FlightProducer.ServerStreamListener listener)
Set up operations to work against the given listener.
|
protected boolean |
shouldContinueWaiting(FlightProducer.ServerStreamListener listener,
long remainingTimeout)
Callback function to run to check if the listener should continue
to be waited on if it leaves the waiting state without being cancelled,
ready, or timed out.
|
BackpressureStrategy.WaitResult |
waitForListener(long timeout)
Waits for the listener to be ready or cancelled up to the given timeout.
|
public void register(FlightProducer.ServerStreamListener listener)
BackpressureStrategyBackpressureStrategy.waitForListener(long) and
OutboundStreamListener.start(VectorSchemaRoot)register in interface BackpressureStrategylistener - The listener this strategy applies to.public BackpressureStrategy.WaitResult waitForListener(long timeout)
BackpressureStrategywaitForListener in interface BackpressureStrategytimeout - The timeout in milliseconds. Infinite if timeout is <= 0.public void interruptWait()
shouldContinueWaiting(FlightProducer.ServerStreamListener, long) to allow FlightProducers to
terminate streams internally and notify clients.protected boolean shouldContinueWaiting(FlightProducer.ServerStreamListener listener, long remainingTimeout)
interruptWait() or if it was woken up due to a spurious wake.protected void readyCallback()
protected void cancelCallback()
Copyright © 2024 The Apache Software Foundation. All rights reserved.