Class ChangeStreamRecord.DataChangeRecord (6.96.1)

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > ChangeStreamRecord.DataChangeRecord

Static Fields

COLUMN_METADATA_FIELD_NUMBER

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()
Returns
Type Description
ChangeStreamRecord.DataChangeRecord

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ChangeStreamRecord.DataChangeRecord.Builder newBuilder()
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.Builder

newBuilder(ChangeStreamRecord.DataChangeRecord prototype)

public static ChangeStreamRecord.DataChangeRecord.Builder newBuilder(ChangeStreamRecord.DataChangeRecord prototype)
Parameter
Name Description
prototype ChangeStreamRecord.DataChangeRecord
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.Builder

parseDelimitedFrom(InputStream input)

public static ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ChangeStreamRecord.DataChangeRecord parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ChangeStreamRecord.DataChangeRecord parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ChangeStreamRecord.DataChangeRecord parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ChangeStreamRecord.DataChangeRecord parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ChangeStreamRecord.DataChangeRecord parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ChangeStreamRecord.DataChangeRecord parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChangeStreamRecord.DataChangeRecord
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ChangeStreamRecord.DataChangeRecord> parser()
Returns
Type Description
Parser<DataChangeRecord>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getColumnMetadata(int index)

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
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.ColumnMetadata

getColumnMetadataCount()

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

getColumnMetadataList()

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;

Returns
Type Description
List<ColumnMetadata>

getColumnMetadataOrBuilder(int index)

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
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder

getColumnMetadataOrBuilderList()

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;

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public ChangeStreamRecord.DataChangeRecord getDefaultInstanceForType()
Returns
Type Description
ChangeStreamRecord.DataChangeRecord

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;

Returns
Type Description
ChangeStreamRecord.DataChangeRecord.ModType

The modType.

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
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.Mod

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;

Returns
Type Description
List<Mod>

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
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.ModOrBuilder

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()
Returns
Type Description
Parser<DataChangeRecord>
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()

public String 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;

Returns
Type Description
ChangeStreamRecord.DataChangeRecord.ValueCaptureType

The valueCaptureType.

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()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ChangeStreamRecord.DataChangeRecord.Builder newBuilderForType()
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ChangeStreamRecord.DataChangeRecord.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ChangeStreamRecord.DataChangeRecord.Builder toBuilder()
Returns
Type Description
ChangeStreamRecord.DataChangeRecord.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException