Class CloudTasksCommittable
java.lang.Object
io.github.flink.gcp.connector.cloudtasks.sink.CloudTasksCommittable
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
FieldsModifier and TypeFieldDescriptionstatic final intPer-envelope allowance used by the writer's accounting, not a measured heap bound.static final intConservative decimal interpretation of the CreateTask reference's 100 KB limit. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CloudTasksCommittablefromTask(String queuePath, long originEpochMillis, long authorizationDeadlineMillis, com.google.cloud.tasks.v2.Task task) Validates a named task before allocating its persisted wire representation.longReturns wire bytes plus the writer's fixed per-envelope accounting allowance.longReturns the durable authorization deadline, which recovery must never loosen.longReturns the original staging wall-clock instant.Returns the resolved queue path.com.google.protobuf.ByteStringReturns immutable, complete named Task wire bytes.inthashCode()com.google.cloud.tasks.v2.TaskParses and validates the persisted task at commit, without rebuilding or renaming it.toString()
-
Field Details
-
MAX_TASK_BYTES
public static final int MAX_TASK_BYTESConservative decimal interpretation of the CreateTask reference's 100 KB limit.- See Also:
-
ACCOUNTING_OVERHEAD_BYTES
public static final int ACCOUNTING_OVERHEAD_BYTESPer-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
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
Parses and validates the persisted task at commit, without rebuilding or renaming it.- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-