Interface CheckpointIDCounter

All Known Implementing Classes:
DeactivatedCheckpointIDCounter, StandaloneCheckpointIDCounter, ZooKeeperCheckpointIDCounter

public interface CheckpointIDCounter
A checkpoint ID counter.
  • Field Details

  • Method Details

    • start

      void start() throws Exception
      Starts the CheckpointIDCounter service down.
      Throws:
      Exception
    • shutdown

      CompletableFuture<Void> shutdown(org.apache.flink.api.common.JobStatus jobStatus)
      Shuts the CheckpointIDCounter 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
    • setCount

      void setCount(long newId) throws Exception
      Sets the current checkpoint ID.
      Parameters:
      newId - The new ID
      Throws:
      Exception