Class StreamEventMetadata.Builder
java.lang.Object
io.debezium.connector.spanner.db.model.StreamEventMetadata.Builder
- Enclosing class:
- StreamEventMetadata
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate com.google.cloud.Timestampprivate com.google.cloud.Timestampprivate Stringprivate com.google.cloud.Timestampprivate com.google.cloud.Timestampprivate com.google.cloud.Timestampprivate com.google.cloud.Timestampprivate com.google.cloud.Timestampprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theStreamEventMetadata.withNumberOfRecordsRead(long numberOfRecordsRead) Sets the number of records read in the partition change stream query before reading this record.withPartitionEndTimestamp(com.google.cloud.Timestamp partitionEndTimestamp) Sets the end time for the partition change stream query that originated this record.withPartitionStartTimestamp(com.google.cloud.Timestamp partitionStartTimestamp) Sets the start time for the partition change stream query that originated this record.withPartitionToken(String partitionToken) Sets the partition token where this record originated from.withQueryStartedAt(com.google.cloud.Timestamp queryStartedAt) Sets the time that the change stream query which produced this record started.withRecordReadAt(com.google.cloud.Timestamp recordReadAt) Sets the time at which the record was fully read.withRecordStreamEndedAt(com.google.cloud.Timestamp recordStreamEndedAt) Sets the time at which the record finished streaming.withRecordStreamStartedAt(com.google.cloud.Timestamp recordStreamStartedAt) Sets the time at which the record started to be streamed.withRecordTimestamp(com.google.cloud.Timestamp recordTimestamp) Sets the timestamp of when this record occurred.withTotalStreamTimeMillis(long totalStreamTimeMillis) Sets the total streaming time (in millis) for this record.
-
Field Details
-
partitionToken
-
recordTimestamp
private com.google.cloud.Timestamp recordTimestamp -
partitionStartTimestamp
private com.google.cloud.Timestamp partitionStartTimestamp -
partitionEndTimestamp
private com.google.cloud.Timestamp partitionEndTimestamp -
queryStartedAt
private com.google.cloud.Timestamp queryStartedAt -
recordStreamStartedAt
private com.google.cloud.Timestamp recordStreamStartedAt -
recordStreamEndedAt
private com.google.cloud.Timestamp recordStreamEndedAt -
recordReadAt
private com.google.cloud.Timestamp recordReadAt -
totalStreamTimeMillis
private long totalStreamTimeMillis -
numberOfRecordsRead
private long numberOfRecordsRead
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withPartitionToken
Sets the partition token where this record originated from.- Parameters:
partitionToken- the partition token to be set- Returns:
- Builder
-
withRecordTimestamp
Sets the timestamp of when this record occurred.- Parameters:
recordTimestamp- the timestamp to be set- Returns:
- Builder
-
withPartitionStartTimestamp
public StreamEventMetadata.Builder withPartitionStartTimestamp(com.google.cloud.Timestamp partitionStartTimestamp) Sets the start time for the partition change stream query that originated this record.- Parameters:
partitionStartTimestamp- the timestamp to be set- Returns:
- Builder
-
withPartitionEndTimestamp
public StreamEventMetadata.Builder withPartitionEndTimestamp(com.google.cloud.Timestamp partitionEndTimestamp) Sets the end time for the partition change stream query that originated this record.- Parameters:
partitionEndTimestamp- the timestamp to be set- Returns:
- Builder
-
withQueryStartedAt
Sets the time that the change stream query which produced this record started.- Parameters:
queryStartedAt- the timestamp to be set- Returns:
- Builder
-
withRecordStreamStartedAt
public StreamEventMetadata.Builder withRecordStreamStartedAt(com.google.cloud.Timestamp recordStreamStartedAt) Sets the time at which the record started to be streamed.- Parameters:
recordStreamStartedAt- the timestamp to be set- Returns:
- Builder
-
withRecordStreamEndedAt
public StreamEventMetadata.Builder withRecordStreamEndedAt(com.google.cloud.Timestamp recordStreamEndedAt) Sets the time at which the record finished streaming.- Parameters:
recordStreamEndedAt- the timestamp to be set- Returns:
- Builder
-
withRecordReadAt
Sets the time at which the record was fully read.- Parameters:
recordReadAt- the timestamp to be set- Returns:
- Builder
-
withTotalStreamTimeMillis
Sets the total streaming time (in millis) for this record.- Parameters:
totalStreamTimeMillis- the total time in millis- Returns:
- Builder
-
withNumberOfRecordsRead
Sets the number of records read in the partition change stream query before reading this record.- Parameters:
numberOfRecordsRead- the number of records read- Returns:
- Builder
-
build
Builds theStreamEventMetadata.- Returns:
- ChangeStreamRecordMetadata
-