public class StandaloneCheckpointIDCounter extends Object implements CheckpointIDCounter
CheckpointIDCounter instances for JobManagers running in HighAvailabilityMode.NONE.
Simple wrapper around an AtomicLong.
INITIAL_CHECKPOINT_ID| Constructor and Description |
|---|
StandaloneCheckpointIDCounter() |
| Modifier and Type | Method and Description |
|---|---|
long |
get()
Atomically gets the current checkpoint ID.
|
long |
getAndIncrement()
Atomically increments the current checkpoint ID.
|
long |
getLast()
Returns the last checkpoint ID (current - 1).
|
void |
setCount(long newCount)
Sets the current checkpoint ID.
|
CompletableFuture<Void> |
shutdown(org.apache.flink.api.common.JobStatus jobStatus)
Shuts the
CheckpointIDCounter service. |
void |
start()
Starts the
CheckpointIDCounter service down. |
public void start()
throws Exception
CheckpointIDCounterCheckpointIDCounter service down.start in interface CheckpointIDCounterExceptionpublic CompletableFuture<Void> shutdown(org.apache.flink.api.common.JobStatus jobStatus)
CheckpointIDCounterCheckpointIDCounter service.
The job status is forwarded and used to decide whether state should actually be discarded or kept.
shutdown in interface CheckpointIDCounterjobStatus - Job state on shut downCompletableFuture holding the result of the shutdown operation.public long getAndIncrement()
throws Exception
CheckpointIDCountergetAndIncrement in interface CheckpointIDCounterExceptionpublic long get()
CheckpointIDCounterget in interface CheckpointIDCounterpublic void setCount(long newCount)
CheckpointIDCountersetCount in interface CheckpointIDCounternewCount - The new IDpublic long getLast()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.