Interface CheckpointIDCounter
- All Known Implementing Classes:
DeactivatedCheckpointIDCounter,StandaloneCheckpointIDCounter,ZooKeeperCheckpointIDCounter
public interface CheckpointIDCounter
A checkpoint ID counter.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongget()Atomically gets the current checkpoint ID.longAtomically increments the current checkpoint ID.voidsetCount(long newId) Sets the current checkpoint ID.shutdown(org.apache.flink.api.common.JobStatus jobStatus) Shuts theCheckpointIDCounterservice.voidstart()Starts theCheckpointIDCounterservice down.
-
Field Details
-
INITIAL_CHECKPOINT_ID
static final int INITIAL_CHECKPOINT_ID- See Also:
-
-
Method Details
-
start
Starts theCheckpointIDCounterservice down.- Throws:
Exception
-
shutdown
Shuts theCheckpointIDCounterservice.The job status is forwarded and used to decide whether state should actually be discarded or kept.
- Parameters:
jobStatus- Job state on shut down- Returns:
- The
CompletableFutureholding the result of the shutdown operation.
-
getAndIncrement
Atomically increments the current checkpoint ID.- Returns:
- The previous checkpoint ID
- Throws:
Exception
-
get
long get()Atomically gets the current checkpoint ID.- Returns:
- The current checkpoint ID
-
setCount
Sets the current checkpoint ID.- Parameters:
newId- The new ID- Throws:
Exception
-