Interface CheckpointIDCounter
-
- All Known Implementing Classes:
DeactivatedCheckpointIDCounter
,KubernetesCheckpointIDCounter
,StandaloneCheckpointIDCounter
,ZooKeeperCheckpointIDCounter
public interface CheckpointIDCounter
A checkpoint ID counter.
-
-
Field Summary
Fields Modifier and Type Field Description static int
INITIAL_CHECKPOINT_ID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
get()
Atomically gets the current checkpoint ID.long
getAndIncrement()
Atomically increments the current checkpoint ID.void
setCount(long newId)
Sets the current checkpoint ID.CompletableFuture<Void>
shutdown(JobStatus jobStatus)
Shuts theCheckpointIDCounter
service.void
start()
Starts theCheckpointIDCounter
service down.
-
-
-
Field Detail
-
INITIAL_CHECKPOINT_ID
static final int INITIAL_CHECKPOINT_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
void start() throws Exception
Starts theCheckpointIDCounter
service down.- Throws:
Exception
-
shutdown
CompletableFuture<Void> shutdown(JobStatus jobStatus)
Shuts theCheckpointIDCounter
service.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
CompletableFuture
holding the result of the shutdown operation.
-
getAndIncrement
long getAndIncrement() throws Exception
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
-
-