public static interface ChangeStreamRecordAdapter.ChangeStreamRecordBuilder<ChangeStreamRecordT>
State management is handled external to the implementation of this class:
onHeartbeat.
onCloseStream.
deleteFamily
deleteCell
startCell, At least 1 CellValue, Exactly 1 finishCell.
The whole flow of constructing a ChangeStreamMutation is:
startUserMutation or startGcMutation.
finishChangeStreamMutation.
Note: For a non-chunked SetCell, only 1 CellValue will be called. For a chunked
SetCell, more than 1 CellValues will be called.
Note: DeleteRow's won't appear in data changes since they'll be converted to multiple DeleteFamily's.
| Modifier and Type | Method and Description |
|---|---|
void |
cellValue(com.google.protobuf.ByteString value)
Called once per non-chunked cell, or at least twice per chunked cell to concatenate the cell
value.
|
void |
deleteCells(String familyName,
com.google.protobuf.ByteString qualifier,
Range.TimestampRange timestampRange)
Called to add a DeleteCell mod.
|
void |
deleteFamily(String familyName)
Called to add a DeleteFamily mod.
|
void |
finishCell()
Called once per cell to signal the end of the value (unless reset).
|
ChangeStreamRecordT |
finishChangeStreamMutation(String token,
org.threeten.bp.Instant estimatedLowWatermark)
Called once per stream record to signal that all mods have been processed (unless reset).
|
ChangeStreamRecordT |
onCloseStream(ReadChangeStreamResponse.CloseStream closeStream)
Called to create a close stream message.
|
ChangeStreamRecordT |
onHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat)
Called to create a heartbeat.
|
void |
reset()
Called when the current in progress change stream record should be dropped
|
void |
startCell(String family,
com.google.protobuf.ByteString qualifier,
long timestampMicros)
Called to start a SetCell.
|
void |
startGcMutation(com.google.protobuf.ByteString rowKey,
org.threeten.bp.Instant commitTimestamp,
int tieBreaker)
Called to start a new Garbage Collection ChangeStreamMutation.
|
void |
startUserMutation(com.google.protobuf.ByteString rowKey,
String sourceClusterId,
org.threeten.bp.Instant commitTimestamp,
int tieBreaker)
Called to start a new user initiated ChangeStreamMutation.
|
ChangeStreamRecordT onHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat)
ChangeStreamRecordT onCloseStream(ReadChangeStreamResponse.CloseStream closeStream)
void startUserMutation(@Nonnull com.google.protobuf.ByteString rowKey, @Nonnull String sourceClusterId, org.threeten.bp.Instant commitTimestamp, int tieBreaker)
void startGcMutation(@Nonnull com.google.protobuf.ByteString rowKey, org.threeten.bp.Instant commitTimestamp, int tieBreaker)
void deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull Range.TimestampRange timestampRange)
void startCell(String family, com.google.protobuf.ByteString qualifier, long timestampMicros)
startCell.
cellValue.
finishCell.
startCell.
cellValue.
finishCell.
void cellValue(com.google.protobuf.ByteString value)
void finishCell()
ChangeStreamRecordT finishChangeStreamMutation(@Nonnull String token, org.threeten.bp.Instant estimatedLowWatermark)
void reset()
Copyright © 2023 Google LLC. All rights reserved.