private class ExtensionStack.Flusher extends IteratingCallback implements WriteCallback
IteratingCallback.Action
Callback.Completable, Callback.Completing, Callback.Nested
Invocable.InvocationType
Modifier and Type | Field and Description |
---|---|
private ExtensionStack.FrameEntry |
current |
__nonBlocking
Modifier | Constructor and Description |
---|---|
private |
Flusher() |
Modifier and Type | Method and Description |
---|---|
private void |
notifyCallbackFailure(WriteCallback callback,
java.lang.Throwable failure) |
private void |
notifyCallbackSuccess(WriteCallback callback) |
protected void |
onCompleteFailure(java.lang.Throwable x)
Invoked when the overall task has completed with a failure.
|
protected void |
onCompleteSuccess()
Invoked when the overall task has completed successfully.
|
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
void |
writeFailed(java.lang.Throwable x)
Callback invoked when the write fails.
|
void |
writeSuccess()
Callback invoked when the write completes.
|
close, failed, isClosed, isFailed, isSucceeded, iterate, reset, succeeded, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInvocationType, getInvocationType, invokeNonBlocking, isNonBlockingInvocation
private ExtensionStack.FrameEntry current
protected IteratingCallback.Action process() throws java.lang.Exception
IteratingCallback
IteratingCallback.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 IteratingCallback
java.lang.Exception
protected void onCompleteSuccess()
IteratingCallback
onCompleteSuccess
in class IteratingCallback
IteratingCallback.onCompleteFailure(Throwable)
protected void onCompleteFailure(java.lang.Throwable x)
IteratingCallback
onCompleteFailure
in class IteratingCallback
x
- the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()
public void writeSuccess()
WriteCallback
Callback invoked when the write completes.
writeSuccess
in interface WriteCallback
WriteCallback.writeFailed(Throwable)
public void writeFailed(java.lang.Throwable x)
WriteCallback
Callback invoked when the write fails.
writeFailed
in interface WriteCallback
x
- the reason for the write failureprivate void notifyCallbackSuccess(WriteCallback callback)
private void notifyCallbackFailure(WriteCallback callback, java.lang.Throwable failure)