Class CloudTasksCommittable

java.lang.Object
io.github.flink.gcp.connector.cloudtasks.sink.CloudTasksCommittable

@Internal public final class CloudTasksCommittable extends Object
One immutable checkpoint committable. Task bytes include the name and are never regenerated. The collector owns recovery; this value is not writer state.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Per-envelope allowance used by the writer's accounting, not a measured heap bound.
    static final int
    Conservative decimal interpretation of the CreateTask reference's 100 KB limit.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    fromTask(String queuePath, long originEpochMillis, long authorizationDeadlineMillis, com.google.cloud.tasks.v2.Task task)
    Validates a named task before allocating its persisted wire representation.
    long
    Returns wire bytes plus the writer's fixed per-envelope accounting allowance.
    long
    Returns the durable authorization deadline, which recovery must never loosen.
    long
    Returns the original staging wall-clock instant.
    Returns the resolved queue path.
    com.google.protobuf.ByteString
    Returns immutable, complete named Task wire bytes.
    int
     
    com.google.cloud.tasks.v2.Task
    Parses and validates the persisted task at commit, without rebuilding or renaming it.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • MAX_TASK_BYTES

      public static final int MAX_TASK_BYTES
      Conservative decimal interpretation of the CreateTask reference's 100 KB limit.
      See Also:
    • ACCOUNTING_OVERHEAD_BYTES

      public static final int ACCOUNTING_OVERHEAD_BYTES
      Per-envelope allowance used by the writer's accounting, not a measured heap bound.
      See Also:
  • Method Details

    • fromTask

      public static CloudTasksCommittable fromTask(String queuePath, long originEpochMillis, long authorizationDeadlineMillis, com.google.cloud.tasks.v2.Task task) throws IOException
      Validates a named task before allocating its persisted wire representation.
      Throws:
      IOException
    • getQueuePath

      public String getQueuePath()
      Returns the resolved queue path.
    • getOriginEpochMillis

      public long getOriginEpochMillis()
      Returns the original staging wall-clock instant.
    • getAuthorizationDeadlineMillis

      public long getAuthorizationDeadlineMillis()
      Returns the durable authorization deadline, which recovery must never loosen.
    • getTaskBytes

      public com.google.protobuf.ByteString getTaskBytes()
      Returns immutable, complete named Task wire bytes.
    • getAccountedBytes

      public long getAccountedBytes()
      Returns wire bytes plus the writer's fixed per-envelope accounting allowance.
    • parseTask

      public com.google.cloud.tasks.v2.Task parseTask() throws IOException
      Parses and validates the persisted task at commit, without rebuilding or renaming it.
      Throws:
      IOException
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object