public static class CheckpointingTaskExample.ComputeTask extends BaseCompute<java.lang.Integer> implements CheckpointableTask
| Constructor and Description |
|---|
ComputeTask() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute(IMessage<java.lang.Integer> content)
Execute with an incoming message
|
void |
initSnapshot(Snapshot snapshot)
This method could be used to predefine packers
|
void |
restoreSnapshot(Snapshot snapshot)
This method will be called when task is initializing
|
void |
takeSnapshot(Snapshot snapshot)
Snapshot should be updated in this method with new values |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCheckpointPropagated, onSnapshotPersistedendExecutepublic void restoreSnapshot(Snapshot snapshot)
CheckpointableTaskrestoreSnapshot in interface CheckpointableTaskpublic void takeSnapshot(Snapshot snapshot)
CheckpointableTaskSnapshot should be updated in this method with new valuestakeSnapshot in interface CheckpointableTaskpublic void initSnapshot(Snapshot snapshot)
CheckpointableTaskinitSnapshot in interface CheckpointableTask