public enum DeactivatedCheckpointIDCounter extends Enum<DeactivatedCheckpointIDCounter> implements CheckpointIDCounter
CheckpointIDCounter
if checkpointing is deactivated.
Consequently, no component should use methods of this class other than start()
and
shutdown(org.apache.flink.api.common.JobStatus)
.Enum Constant and Description |
---|
INSTANCE |
INITIAL_CHECKPOINT_ID
Modifier and Type | Method and 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 the
CheckpointIDCounter service. |
void |
start()
Starts the
CheckpointIDCounter service down. |
static DeactivatedCheckpointIDCounter |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DeactivatedCheckpointIDCounter[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DeactivatedCheckpointIDCounter INSTANCE
public static DeactivatedCheckpointIDCounter[] values()
for (DeactivatedCheckpointIDCounter c : DeactivatedCheckpointIDCounter.values()) System.out.println(c);
public static DeactivatedCheckpointIDCounter valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic void start() throws Exception
CheckpointIDCounter
CheckpointIDCounter
service down.start
in interface CheckpointIDCounter
Exception
public CompletableFuture<Void> shutdown(JobStatus jobStatus)
CheckpointIDCounter
CheckpointIDCounter
service.
The job status is forwarded and used to decide whether state should actually be discarded or kept.
shutdown
in interface CheckpointIDCounter
jobStatus
- Job state on shut downCompletableFuture
holding the result of the shutdown operation.public long getAndIncrement() throws Exception
CheckpointIDCounter
getAndIncrement
in interface CheckpointIDCounter
Exception
public long get()
CheckpointIDCounter
get
in interface CheckpointIDCounter
public void setCount(long newId) throws Exception
CheckpointIDCounter
setCount
in interface CheckpointIDCounter
newId
- The new IDException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.