Class ChangeStreamRecord.DataChangeRecord

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ChangeStreamRecord.DataChangeRecordOrBuilder, Serializable
Enclosing class:
ChangeStreamRecord

public static final class ChangeStreamRecord.DataChangeRecord extends com.google.protobuf.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
See Also:
  • Field Details

    • COMMIT_TIMESTAMP_FIELD_NUMBER

      public static final int COMMIT_TIMESTAMP_FIELD_NUMBER
      See Also:
    • RECORD_SEQUENCE_FIELD_NUMBER

      public static final int RECORD_SEQUENCE_FIELD_NUMBER
      See Also:
    • SERVER_TRANSACTION_ID_FIELD_NUMBER

      public static final int SERVER_TRANSACTION_ID_FIELD_NUMBER
      See Also:
    • IS_LAST_RECORD_IN_TRANSACTION_IN_PARTITION_FIELD_NUMBER

      public static final int IS_LAST_RECORD_IN_TRANSACTION_IN_PARTITION_FIELD_NUMBER
      See Also:
    • TABLE_FIELD_NUMBER

      public static final int TABLE_FIELD_NUMBER
      See Also:
    • COLUMN_METADATA_FIELD_NUMBER

      public static final int COLUMN_METADATA_FIELD_NUMBER
      See Also:
    • MODS_FIELD_NUMBER

      public static final int MODS_FIELD_NUMBER
      See Also:
    • MOD_TYPE_FIELD_NUMBER

      public static final int MOD_TYPE_FIELD_NUMBER
      See Also:
    • VALUE_CAPTURE_TYPE_FIELD_NUMBER

      public static final int VALUE_CAPTURE_TYPE_FIELD_NUMBER
      See Also:
    • NUMBER_OF_RECORDS_IN_TRANSACTION_FIELD_NUMBER

      public static final int NUMBER_OF_RECORDS_IN_TRANSACTION_FIELD_NUMBER
      See Also:
    • NUMBER_OF_PARTITIONS_IN_TRANSACTION_FIELD_NUMBER

      public static final int NUMBER_OF_PARTITIONS_IN_TRANSACTION_FIELD_NUMBER
      See Also:
    • TRANSACTION_TAG_FIELD_NUMBER

      public static final int TRANSACTION_TAG_FIELD_NUMBER
      See Also:
    • IS_SYSTEM_TRANSACTION_FIELD_NUMBER

      public static final int IS_SYSTEM_TRANSACTION_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • 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;
      Specified by:
      hasCommitTimestamp in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      Whether the commitTimestamp field is set.
    • getCommitTimestamp

      public com.google.protobuf.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;
      Specified by:
      getCommitTimestamp in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The commitTimestamp.
    • getCommitTimestampOrBuilder

      public com.google.protobuf.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;
      Specified by:
      getCommitTimestampOrBuilder in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • 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][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id]
       by
       [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence]
       to reconstruct the ordering of the changes within the transaction.
       
      string record_sequence = 2;
      Specified by:
      getRecordSequence in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The recordSequence.
    • getRecordSequenceBytes

      public com.google.protobuf.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][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id]
       by
       [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence]
       to reconstruct the ordering of the changes within the transaction.
       
      string record_sequence = 2;
      Specified by:
      getRecordSequenceBytes in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The bytes for recordSequence.
    • 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;
      Specified by:
      getServerTransactionId in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The serverTransactionId.
    • getServerTransactionIdBytes

      public com.google.protobuf.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;
      Specified by:
      getServerTransactionIdBytes in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The bytes for serverTransactionId.
    • 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;
      Specified by:
      getIsLastRecordInTransactionInPartition in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The isLastRecordInTransactionInPartition.
    • getTable

      public String getTable()
       Name of the table affected by the change.
       
      string table = 5;
      Specified by:
      getTable in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The table.
    • getTableBytes

      public com.google.protobuf.ByteString getTableBytes()
       Name of the table affected by the change.
       
      string table = 5;
      Specified by:
      getTableBytes in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The bytes for table.
    • getColumnMetadataList

       Provides metadata describing the columns associated with the
       [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed
       below.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
      Specified by:
      getColumnMetadataList in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getColumnMetadataOrBuilderList

      public List<? extends ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder> getColumnMetadataOrBuilderList()
       Provides metadata describing the columns associated with the
       [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed
       below.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
      Specified by:
      getColumnMetadataOrBuilderList in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getColumnMetadataCount

      public int getColumnMetadataCount()
       Provides metadata describing the columns associated with the
       [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed
       below.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
      Specified by:
      getColumnMetadataCount in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getColumnMetadata

      public ChangeStreamRecord.DataChangeRecord.ColumnMetadata getColumnMetadata(int index)
       Provides metadata describing the columns associated with the
       [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed
       below.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
      Specified by:
      getColumnMetadata in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getColumnMetadataOrBuilder

      public ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder getColumnMetadataOrBuilder(int index)
       Provides metadata describing the columns associated with the
       [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed
       below.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
      Specified by:
      getColumnMetadataOrBuilder in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getModsList

       Describes the changes that were made.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
      Specified by:
      getModsList in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getModsOrBuilderList

      public List<? extends ChangeStreamRecord.DataChangeRecord.ModOrBuilder> getModsOrBuilderList()
       Describes the changes that were made.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
      Specified by:
      getModsOrBuilderList in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getModsCount

      public int getModsCount()
       Describes the changes that were made.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
      Specified by:
      getModsCount in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getMods

      public ChangeStreamRecord.DataChangeRecord.Mod getMods(int index)
       Describes the changes that were made.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
      Specified by:
      getMods in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getModsOrBuilder

      public ChangeStreamRecord.DataChangeRecord.ModOrBuilder getModsOrBuilder(int index)
       Describes the changes that were made.
       
      repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
      Specified by:
      getModsOrBuilder in interface ChangeStreamRecord.DataChangeRecordOrBuilder
    • getModTypeValue

      public int getModTypeValue()
       Describes the type of change.
       
      .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
      Specified by:
      getModTypeValue in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The enum numeric value on the wire for modType.
    • getModType

       Describes the type of change.
       
      .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
      Specified by:
      getModType in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The modType.
    • 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;
      Specified by:
      getValueCaptureTypeValue in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The enum numeric value on the wire for 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;
      Specified by:
      getValueCaptureType in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The valueCaptureType.
    • 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;
      Specified by:
      getNumberOfRecordsInTransaction in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The numberOfRecordsInTransaction.
    • 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;
      Specified by:
      getNumberOfPartitionsInTransaction in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The numberOfPartitionsInTransaction.
    • getTransactionTag

      public String getTransactionTag()
       Indicates the transaction tag associated with this transaction.
       
      string transaction_tag = 12;
      Specified by:
      getTransactionTag in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The transactionTag.
    • getTransactionTagBytes

      public com.google.protobuf.ByteString getTransactionTagBytes()
       Indicates the transaction tag associated with this transaction.
       
      string transaction_tag = 12;
      Specified by:
      getTransactionTagBytes in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The bytes for transactionTag.
    • 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;
      Specified by:
      getIsSystemTransaction in interface ChangeStreamRecord.DataChangeRecordOrBuilder
      Returns:
      The isSystemTransaction.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ChangeStreamRecord.DataChangeRecord parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ChangeStreamRecord.DataChangeRecord.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ChangeStreamRecord.DataChangeRecord.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ChangeStreamRecord.DataChangeRecord.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static ChangeStreamRecord.DataChangeRecord getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ChangeStreamRecord.DataChangeRecord> parser()
    • getParserForType

      public com.google.protobuf.Parser<ChangeStreamRecord.DataChangeRecord> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public ChangeStreamRecord.DataChangeRecord getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder