public interface StatefulTask<T extends StateHandle<?>>
| Modifier and Type | Method and Description |
|---|---|
void |
notifyCheckpointComplete(long checkpointId)
Invoked when a checkpoint has been completed, i.e., when the checkpoint coordinator has received
the notification from all participating tasks.
|
void |
setInitialState(T stateHandle)
Sets the initial state of the operator, upon recovery.
|
boolean |
triggerCheckpoint(long checkpointId,
long timestamp)
This method is either called directly and asynchronously by the checkpoint
coordinator (in the case of functions that are directly notified - usually
the data sources), or called synchronously when all incoming channels have
reported a checkpoint barrier.
|
void setInitialState(T stateHandle) throws Exception
stateHandle - The handle to the state.Exceptionboolean triggerCheckpoint(long checkpointId,
long timestamp)
throws Exception
checkpointId - The ID of the checkpoint, incrementing.timestamp - The timestamp when the checkpoint was triggered at the JobManager.false if the checkpoint can not be carried out, true otherwiseExceptionvoid notifyCheckpointComplete(long checkpointId)
throws Exception
checkpointId - The ID of the checkpoint that is complete..Exception - The notification method may forward its exceptions.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.