Interface CheckpointIDCounter
-
- All Known Implementing Classes:
DeactivatedCheckpointIDCounter,StandaloneCheckpointIDCounter,ZooKeeperCheckpointIDCounter
public interface CheckpointIDCounterA checkpoint ID counter.
-
-
Field Summary
Fields Modifier and Type Field Description static intINITIAL_CHECKPOINT_ID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longget()Atomically gets the current checkpoint ID.longgetAndIncrement()Atomically increments the current checkpoint ID.voidsetCount(long newId)Sets the current checkpoint ID.CompletableFuture<Void>shutdown(org.apache.flink.api.common.JobStatus jobStatus)Shuts theCheckpointIDCounterservice.voidstart()Starts theCheckpointIDCounterservice down.
-
-
-
Field Detail
-
INITIAL_CHECKPOINT_ID
static final int INITIAL_CHECKPOINT_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
void start() throws ExceptionStarts theCheckpointIDCounterservice down.- Throws:
Exception
-
shutdown
CompletableFuture<Void> shutdown(org.apache.flink.api.common.JobStatus jobStatus)
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
long getAndIncrement() throws ExceptionAtomically 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
-
-