Class CheckpointStore

  • All Implemented Interfaces:

    
    public final class CheckpointStore
    
                        

    Resumable transfer checkpoints with conditional writes (HEL-236 scenario 4).

    Design: checkpoints are an APPEND-ONLY sequence of immutable objects (<prefix>/checkpoint-<seq>.json), each created with WriteCondition.IfAbsent. Advancing means creating sequence latest + 1; when two workers race, exactly one create succeeds and the loser gets a PreconditionFailedException — it must reload latest and re-plan, so concurrent workers can never silently overwrite each other's progress. Deliberately built on CONDITIONAL_CREATE only (universally the best-supported conditional primitive across S3-compatible providers) rather than etag-If-Match update-in-place.

    The payload is caller-defined (Checkpoint.data); keep it a POSITION (keys, offsets, watermarks) — never row values or credentials.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final CheckpointStore.Checkpoint latest() The newest committed checkpoint, or null when none exists yet.
      final CheckpointStore.Checkpoint save(String data, Long expectedSequence) Commit the next checkpoint.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait