public static class KafkaExample.KSink extends java.lang.Object implements ICompute, CheckpointableTask
Constructor and Description |
---|
KSink() |
Modifier and Type | Method and Description |
---|---|
boolean |
execute(IMessage content)
Execute with an incoming message
|
void |
initSnapshot(Snapshot snapshot)
This method could be used to predefine packers
|
void |
prepare(Config cfg,
TaskContext ctx)
Prepare the task to be executed
|
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, wait
endExecute
onCheckpointPropagated, onSnapshotPersisted
public boolean execute(IMessage content)
ICompute
public void prepare(Config cfg, TaskContext ctx)
INode
public void restoreSnapshot(Snapshot snapshot)
CheckpointableTask
restoreSnapshot
in interface CheckpointableTask
public void takeSnapshot(Snapshot snapshot)
CheckpointableTask
Snapshot
should be updated in this method with new valuestakeSnapshot
in interface CheckpointableTask
public void initSnapshot(Snapshot snapshot)
CheckpointableTask
initSnapshot
in interface CheckpointableTask