Class PartitionMetadata.Builder
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.model.PartitionMetadata.Builder
- Enclosing class:
PartitionMetadata
Partition metadata builder for better user experience. Defaults for all fields are nulls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPartitionMetadata
from the given fields.setCreatedAt
(com.google.cloud.Timestamp createdAt) Sets the time at which the partition was created.setEndTimestamp
(com.google.cloud.Timestamp endTimestamp) Sets the end time of the partition.setFinishedAt
(com.google.cloud.Timestamp finishedAt) Sets the time at which the partition finished running.setHeartbeatMillis
(long heartbeatMillis) Sets the heartbeat interval in millis.setParentTokens
(HashSet<String> parentTokens) Sets the collection of parent partition identifiers.setPartitionToken
(String partitionToken) Sets the unique partition identifier.setRunningAt
(com.google.cloud.Timestamp runningAt) Sets the time at which the partition started running.setScheduledAt
(com.google.cloud.Timestamp scheduledAt) Sets the time at which the partition was scheduled.setStartTimestamp
(com.google.cloud.Timestamp startTimestamp) Sets the start time of the partition.setState
(PartitionMetadata.State state) Sets the current state of the partition.setWatermark
(com.google.cloud.Timestamp watermark) Sets the watermark (last processed timestamp) for the partition.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setPartitionToken
Sets the unique partition identifier. -
setParentTokens
Sets the collection of parent partition identifiers. -
setStartTimestamp
Sets the start time of the partition. -
setEndTimestamp
Sets the end time of the partition. -
setHeartbeatMillis
Sets the heartbeat interval in millis. -
setState
Sets the current state of the partition. -
setWatermark
Sets the watermark (last processed timestamp) for the partition. -
setCreatedAt
Sets the time at which the partition was created. -
setScheduledAt
Sets the time at which the partition was scheduled. -
setRunningAt
Sets the time at which the partition started running. -
setFinishedAt
Sets the time at which the partition finished running. -
build
Builds aPartitionMetadata
from the given fields. Mandatory fields are:- partition token
- parent tokens
- start timestamp
- heartbeat millis
- state
- watermark
-