Interface CheckpointIDCounter

    • Method Detail

      • shutdown

        CompletableFuture<Void> shutdown​(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