public static final class ChangeStreamRecord.DataChangeRecord extends GeneratedMessageV3 implements ChangeStreamRecord.DataChangeRecordOrBuilder
A data change record contains a set of changes to a table with the same
modification type (insert, update, or delete) committed at the same commit
timestamp in one change stream partition for the same transaction. Multiple
data change records can be returned for the same transaction across
multiple change stream partitions.
Protobuf type google.spanner.v1.ChangeStreamRecord.DataChangeRecord
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int COLUMN_METADATA_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
COMMIT_TIMESTAMP_FIELD_NUMBER
public static final int COMMIT_TIMESTAMP_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IS_LAST_RECORD_IN_TRANSACTION_IN_PARTITION_FIELD_NUMBER
public static final int IS_LAST_RECORD_IN_TRANSACTION_IN_PARTITION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IS_SYSTEM_TRANSACTION_FIELD_NUMBER
public static final int IS_SYSTEM_TRANSACTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MODS_FIELD_NUMBER
public static final int MODS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MOD_TYPE_FIELD_NUMBER
public static final int MOD_TYPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NUMBER_OF_PARTITIONS_IN_TRANSACTION_FIELD_NUMBER
public static final int NUMBER_OF_PARTITIONS_IN_TRANSACTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NUMBER_OF_RECORDS_IN_TRANSACTION_FIELD_NUMBER
public static final int NUMBER_OF_RECORDS_IN_TRANSACTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
RECORD_SEQUENCE_FIELD_NUMBER
public static final int RECORD_SEQUENCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SERVER_TRANSACTION_ID_FIELD_NUMBER
public static final int SERVER_TRANSACTION_ID_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TABLE_FIELD_NUMBER
public static final int TABLE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TRANSACTION_TAG_FIELD_NUMBER
public static final int TRANSACTION_TAG_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
VALUE_CAPTURE_TYPE_FIELD_NUMBER
public static final int VALUE_CAPTURE_TYPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static ChangeStreamRecord.DataChangeRecord getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static ChangeStreamRecord.DataChangeRecord.Builder newBuilder()
newBuilder(ChangeStreamRecord.DataChangeRecord prototype)
public static ChangeStreamRecord.DataChangeRecord.Builder newBuilder(ChangeStreamRecord.DataChangeRecord prototype)
public static ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(InputStream input)
public static ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static ChangeStreamRecord.DataChangeRecord parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ChangeStreamRecord.DataChangeRecord parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ChangeStreamRecord.DataChangeRecord parseFrom(CodedInputStream input)
public static ChangeStreamRecord.DataChangeRecord parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ChangeStreamRecord.DataChangeRecord parseFrom(InputStream input)
public static ChangeStreamRecord.DataChangeRecord parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<ChangeStreamRecord.DataChangeRecord> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public ChangeStreamRecord.DataChangeRecord.ColumnMetadata getColumnMetadata(int index)
Provides metadata describing the columns associated with the
mods listed
below.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
Parameter |
Name |
Description |
index |
int
|
public int getColumnMetadataCount()
Provides metadata describing the columns associated with the
mods listed
below.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
Returns |
Type |
Description |
int |
|
public List<ChangeStreamRecord.DataChangeRecord.ColumnMetadata> getColumnMetadataList()
Provides metadata describing the columns associated with the
mods listed
below.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
public ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder getColumnMetadataOrBuilder(int index)
Provides metadata describing the columns associated with the
mods listed
below.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
Parameter |
Name |
Description |
index |
int
|
public List<? extends ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder> getColumnMetadataOrBuilderList()
Provides metadata describing the columns associated with the
mods listed
below.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
Returns |
Type |
Description |
List<? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder> |
|
getCommitTimestamp()
public Timestamp getCommitTimestamp()
Indicates the timestamp in which the change was committed.
DataChangeRecord.commit_timestamps,
PartitionStartRecord.start_timestamps,
PartitionEventRecord.commit_timestamps, and
PartitionEndRecord.end_timestamps can have the same value in the same
partition.
.google.protobuf.Timestamp commit_timestamp = 1;
Returns |
Type |
Description |
Timestamp |
The commitTimestamp.
|
getCommitTimestampOrBuilder()
public TimestampOrBuilder getCommitTimestampOrBuilder()
Indicates the timestamp in which the change was committed.
DataChangeRecord.commit_timestamps,
PartitionStartRecord.start_timestamps,
PartitionEventRecord.commit_timestamps, and
PartitionEndRecord.end_timestamps can have the same value in the same
partition.
.google.protobuf.Timestamp commit_timestamp = 1;
getDefaultInstanceForType()
public ChangeStreamRecord.DataChangeRecord getDefaultInstanceForType()
getIsLastRecordInTransactionInPartition()
public boolean getIsLastRecordInTransactionInPartition()
Indicates whether this is the last record for a transaction in the
current partition. Clients can use this field to determine when all
records for a transaction in the current partition have been received.
bool is_last_record_in_transaction_in_partition = 4;
Returns |
Type |
Description |
boolean |
The isLastRecordInTransactionInPartition.
|
getIsSystemTransaction()
public boolean getIsSystemTransaction()
Indicates whether the transaction is a system transaction. System
transactions include those issued by time-to-live (TTL), column backfill,
etc.
bool is_system_transaction = 13;
Returns |
Type |
Description |
boolean |
The isSystemTransaction.
|
getModType()
public ChangeStreamRecord.DataChangeRecord.ModType getModType()
Describes the type of change.
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
getModTypeValue()
public int getModTypeValue()
Describes the type of change.
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for modType.
|
getMods(int index)
public ChangeStreamRecord.DataChangeRecord.Mod getMods(int index)
Describes the changes that were made.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
Parameter |
Name |
Description |
index |
int
|
getModsCount()
public int getModsCount()
Describes the changes that were made.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
Returns |
Type |
Description |
int |
|
getModsList()
public List<ChangeStreamRecord.DataChangeRecord.Mod> getModsList()
Describes the changes that were made.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
getModsOrBuilder(int index)
public ChangeStreamRecord.DataChangeRecord.ModOrBuilder getModsOrBuilder(int index)
Describes the changes that were made.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
Parameter |
Name |
Description |
index |
int
|
getModsOrBuilderList()
public List<? extends ChangeStreamRecord.DataChangeRecord.ModOrBuilder> getModsOrBuilderList()
Describes the changes that were made.
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
Returns |
Type |
Description |
List<? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder> |
|
getNumberOfPartitionsInTransaction()
public int getNumberOfPartitionsInTransaction()
Indicates the number of partitions that return data change records for
this transaction. This value can be helpful in assembling all records
associated with a particular transaction.
int32 number_of_partitions_in_transaction = 11;
Returns |
Type |
Description |
int |
The numberOfPartitionsInTransaction.
|
getNumberOfRecordsInTransaction()
public int getNumberOfRecordsInTransaction()
Indicates the number of data change records that are part of this
transaction across all change stream partitions. This value can be used
to assemble all the records associated with a particular transaction.
int32 number_of_records_in_transaction = 10;
Returns |
Type |
Description |
int |
The numberOfRecordsInTransaction.
|
getParserForType()
public Parser<ChangeStreamRecord.DataChangeRecord> getParserForType()
Overrides
getRecordSequence()
public String getRecordSequence()
Record sequence numbers are unique and monotonically increasing (but not
necessarily contiguous) for a specific timestamp across record
types in the same partition. To guarantee ordered processing, the reader
should process records (of potentially different types) in
record_sequence order for a specific timestamp in the same partition.
The record sequence number ordering across partitions is only meaningful
in the context of a specific transaction. Record sequence numbers are
unique across partitions for a specific transaction. Sort the
DataChangeRecords for the same
server_transaction_id
by
record_sequence
to reconstruct the ordering of the changes within the transaction.
string record_sequence = 2;
Returns |
Type |
Description |
String |
The recordSequence.
|
getRecordSequenceBytes()
public ByteString getRecordSequenceBytes()
Record sequence numbers are unique and monotonically increasing (but not
necessarily contiguous) for a specific timestamp across record
types in the same partition. To guarantee ordered processing, the reader
should process records (of potentially different types) in
record_sequence order for a specific timestamp in the same partition.
The record sequence number ordering across partitions is only meaningful
in the context of a specific transaction. Record sequence numbers are
unique across partitions for a specific transaction. Sort the
DataChangeRecords for the same
server_transaction_id
by
record_sequence
to reconstruct the ordering of the changes within the transaction.
string record_sequence = 2;
Returns |
Type |
Description |
ByteString |
The bytes for recordSequence.
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getServerTransactionId()
public String getServerTransactionId()
Provides a globally unique string that represents the transaction in
which the change was committed. Multiple transactions can have the same
commit timestamp, but each transaction has a unique
server_transaction_id.
string server_transaction_id = 3;
Returns |
Type |
Description |
String |
The serverTransactionId.
|
getServerTransactionIdBytes()
public ByteString getServerTransactionIdBytes()
Provides a globally unique string that represents the transaction in
which the change was committed. Multiple transactions can have the same
commit timestamp, but each transaction has a unique
server_transaction_id.
string server_transaction_id = 3;
Returns |
Type |
Description |
ByteString |
The bytes for serverTransactionId.
|
getTable()
Name of the table affected by the change.
string table = 5;
Returns |
Type |
Description |
String |
The table.
|
getTableBytes()
public ByteString getTableBytes()
Name of the table affected by the change.
string table = 5;
Returns |
Type |
Description |
ByteString |
The bytes for table.
|
getTransactionTag()
public String getTransactionTag()
Indicates the transaction tag associated with this transaction.
string transaction_tag = 12;
Returns |
Type |
Description |
String |
The transactionTag.
|
getTransactionTagBytes()
public ByteString getTransactionTagBytes()
Indicates the transaction tag associated with this transaction.
string transaction_tag = 12;
Returns |
Type |
Description |
ByteString |
The bytes for transactionTag.
|
getValueCaptureType()
public ChangeStreamRecord.DataChangeRecord.ValueCaptureType getValueCaptureType()
Describes the value capture type that was specified in the change stream
configuration when this change was captured.
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
getValueCaptureTypeValue()
public int getValueCaptureTypeValue()
Describes the value capture type that was specified in the change stream
configuration when this change was captured.
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for valueCaptureType.
|
hasCommitTimestamp()
public boolean hasCommitTimestamp()
Indicates the timestamp in which the change was committed.
DataChangeRecord.commit_timestamps,
PartitionStartRecord.start_timestamps,
PartitionEventRecord.commit_timestamps, and
PartitionEndRecord.end_timestamps can have the same value in the same
partition.
.google.protobuf.Timestamp commit_timestamp = 1;
Returns |
Type |
Description |
boolean |
Whether the commitTimestamp field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public ChangeStreamRecord.DataChangeRecord.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ChangeStreamRecord.DataChangeRecord.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public ChangeStreamRecord.DataChangeRecord.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides