Class StandaloneCheckpointIDCounter
java.lang.Object
org.apache.flink.runtime.checkpoint.StandaloneCheckpointIDCounter
- All Implemented Interfaces:
CheckpointIDCounter
CheckpointIDCounter instances for JobManagers running in HighAvailabilityMode.NONE.
Simple wrapper around an AtomicLong.
-
Field Summary
Fields inherited from interface org.apache.flink.runtime.checkpoint.CheckpointIDCounter
INITIAL_CHECKPOINT_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongget()Atomically gets the current checkpoint ID.longAtomically increments the current checkpoint ID.longgetLast()Returns the last checkpoint ID (current - 1).voidsetCount(long newCount) Sets the current checkpoint ID.shutdown(org.apache.flink.api.common.JobStatus jobStatus) Shuts theCheckpointIDCounterservice.voidstart()Starts theCheckpointIDCounterservice down.
-
Constructor Details
-
StandaloneCheckpointIDCounter
public StandaloneCheckpointIDCounter()
-
-
Method Details
-
start
Description copied from interface:CheckpointIDCounterStarts theCheckpointIDCounterservice down.- Specified by:
startin interfaceCheckpointIDCounter- Throws:
Exception
-
shutdown
Description copied from interface:CheckpointIDCounterShuts theCheckpointIDCounterservice.The job status is forwarded and used to decide whether state should actually be discarded or kept.
- Specified by:
shutdownin interfaceCheckpointIDCounter- Parameters:
jobStatus- Job state on shut down- Returns:
- The
CompletableFutureholding the result of the shutdown operation.
-
getAndIncrement
Description copied from interface:CheckpointIDCounterAtomically increments the current checkpoint ID.- Specified by:
getAndIncrementin interfaceCheckpointIDCounter- Returns:
- The previous checkpoint ID
- Throws:
Exception
-
get
public long get()Description copied from interface:CheckpointIDCounterAtomically gets the current checkpoint ID.- Specified by:
getin interfaceCheckpointIDCounter- Returns:
- The current checkpoint ID
-
setCount
public void setCount(long newCount) Description copied from interface:CheckpointIDCounterSets the current checkpoint ID.- Specified by:
setCountin interfaceCheckpointIDCounter- Parameters:
newCount- The new ID
-
getLast
public long getLast()Returns the last checkpoint ID (current - 1).- Returns:
- Last checkpoint ID.
-