public abstract class AbstractAsyncSnapshotIOCallable<H extends StateObject> extends AbstractAsyncIOCallable<H,CheckpointStreamFactory.CheckpointStateOutputStream>
CheckedOutputStream. This includes participating in lifecycle management
through a CloseableRegistry.| Modifier and Type | Field and Description |
|---|---|
protected long |
checkpointId |
protected CloseableRegistry |
closeStreamOnCancelRegistry |
protected AtomicBoolean |
open |
protected CheckpointStreamFactory |
streamFactory |
protected long |
timestamp |
| Constructor and Description |
|---|
AbstractAsyncSnapshotIOCallable(long checkpointId,
long timestamp,
CheckpointStreamFactory streamFactory,
CloseableRegistry closeStreamOnCancelRegistry) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkStreamClosedAndDoTransitionToOpen() |
protected boolean |
checkStreamOpenAndDoTransitionToClose() |
protected StreamStateHandle |
closeStreamAndGetStateHandle() |
void |
done(boolean canceled)
Optional callback that subclasses can implement.
|
CheckpointStreamFactory.CheckpointStateOutputStream |
openIOHandle()
Open the IO Handle (e.g.
|
call, getIoHandle, getStopException, isStopped, performOperation, stopprotected final long checkpointId
protected final long timestamp
protected final CheckpointStreamFactory streamFactory
protected final CloseableRegistry closeStreamOnCancelRegistry
protected final AtomicBoolean open
public AbstractAsyncSnapshotIOCallable(long checkpointId,
long timestamp,
CheckpointStreamFactory streamFactory,
CloseableRegistry closeStreamOnCancelRegistry)
public CheckpointStreamFactory.CheckpointStateOutputStream openIOHandle() throws Exception
AbstractAsyncIOCallableopenIOHandle in class AbstractAsyncIOCallable<H extends StateObject,CheckpointStreamFactory.CheckpointStateOutputStream>Exceptionpublic void done(boolean canceled)
AbstractAsyncIOCallabledone in interface AsyncDoneCallbackdone in class AbstractAsyncIOCallable<H extends StateObject,CheckpointStreamFactory.CheckpointStateOutputStream>canceled - true if the callback is done, but was canceledprotected boolean checkStreamClosedAndDoTransitionToOpen()
protected boolean checkStreamOpenAndDoTransitionToClose()
protected StreamStateHandle closeStreamAndGetStateHandle() throws IOException
IOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.