public class FrameFlusher extends IteratingCallback
IteratingCallback.ActionCallback.Completable, Callback.NestedInvocable.InvocationType| Modifier and Type | Field and Description |
|---|---|
static BinaryFrame |
FLUSH_FRAME |
__nonBlocking| Constructor and Description |
|---|
FrameFlusher(ByteBufferPool bufferPool,
Generator generator,
EndPoint endPoint,
int bufferSize,
int maxGather) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enqueue(Frame frame,
WriteCallback callback,
BatchMode batchMode) |
protected void |
notifyCallbackFailure(WriteCallback callback,
java.lang.Throwable failure) |
protected void |
notifyCallbackSuccess(WriteCallback callback) |
void |
onCompleteFailure(java.lang.Throwable failure)
Invoked when the overall task has completed with a failure.
|
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
void |
succeeded()
Invoked when the sub task succeeds.
|
java.lang.String |
toString() |
close, failed, isClosed, isFailed, isSucceeded, iterate, onCompleteSuccess, resetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInvocationType, getInvocationType, invokeNonBlocking, isNonBlockingInvocationpublic static final BinaryFrame FLUSH_FRAME
public FrameFlusher(ByteBufferPool bufferPool, Generator generator, EndPoint endPoint, int bufferSize, int maxGather)
public boolean enqueue(Frame frame, WriteCallback callback, BatchMode batchMode)
protected IteratingCallback.Action process() throws java.lang.Throwable
IteratingCallbackIteratingCallback.iterate() to process the sub task.
Implementations must start the asynchronous execution of the sub task (if any) and return an appropriate action:
IteratingCallback.Action.IDLE when no sub tasks are available for execution
but the overall job is not completed yetIteratingCallback.Action.SCHEDULED when the sub task asynchronous execution
has been startedIteratingCallback.Action.SUCCEEDED when the overall job is completedprocess in class IteratingCallbackjava.lang.Throwable - if the sub task processing throwspublic void succeeded()
IteratingCallbacksuper.succeeded().succeeded in interface Callbacksucceeded in class IteratingCallbackCallback.failed(Throwable)public void onCompleteFailure(java.lang.Throwable failure)
IteratingCallbackonCompleteFailure in class IteratingCallbackfailure - the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()protected void notifyCallbackSuccess(WriteCallback callback)
protected void notifyCallbackFailure(WriteCallback callback, java.lang.Throwable failure)
public java.lang.String toString()
toString in class IteratingCallbackCopyright © 1995–2021 Webtide. All rights reserved.