Class ChangeStreamRecord (6.96.1)

public final class ChangeStreamRecord extends GeneratedMessageV3 implements ChangeStreamRecordOrBuilder

Spanner Change Streams enable customers to capture and stream out changes to their Spanner databases in real-time. A change stream can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or partition_mode='MUTABLE_KEY_RANGE'.

This message is only used in Change Streams created with the option partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special Table-Valued Function (TVF) along with each Change Streams. The function provides access to the change stream's records. The function is named READ_<change_stream_name> (where <change_stream_name> is the name of the change stream), and it returns a table with only one column called ChangeRecord.

Protobuf type google.spanner.v1.ChangeStreamRecord

Static Fields

DATA_CHANGE_RECORD_FIELD_NUMBER

public static final int DATA_CHANGE_RECORD_FIELD_NUMBER
Field Value
Type Description
int

HEARTBEAT_RECORD_FIELD_NUMBER

public static final int HEARTBEAT_RECORD_FIELD_NUMBER
Field Value
Type Description
int

PARTITION_END_RECORD_FIELD_NUMBER

public static final int PARTITION_END_RECORD_FIELD_NUMBER
Field Value
Type Description
int

PARTITION_EVENT_RECORD_FIELD_NUMBER

public static final int PARTITION_EVENT_RECORD_FIELD_NUMBER
Field Value
Type Description
int

PARTITION_START_RECORD_FIELD_NUMBER

public static final int PARTITION_START_RECORD_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ChangeStreamRecord getDefaultInstance()
Returns
Type Description
ChangeStreamRecord

getDescriptor()

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

newBuilder()

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

newBuilder(ChangeStreamRecord prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDataChangeRecord()

public ChangeStreamRecord.DataChangeRecord getDataChangeRecord()

Data change record describing a data change for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;

Returns
Type Description
ChangeStreamRecord.DataChangeRecord

The dataChangeRecord.

getDataChangeRecordOrBuilder()

public ChangeStreamRecord.DataChangeRecordOrBuilder getDataChangeRecordOrBuilder()

Data change record describing a data change for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;

Returns
Type Description
ChangeStreamRecord.DataChangeRecordOrBuilder

getDefaultInstanceForType()

public ChangeStreamRecord getDefaultInstanceForType()
Returns
Type Description
ChangeStreamRecord

getHeartbeatRecord()

public ChangeStreamRecord.HeartbeatRecord getHeartbeatRecord()

Heartbeat record describing a heartbeat for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;

Returns
Type Description
ChangeStreamRecord.HeartbeatRecord

The heartbeatRecord.

getHeartbeatRecordOrBuilder()

public ChangeStreamRecord.HeartbeatRecordOrBuilder getHeartbeatRecordOrBuilder()

Heartbeat record describing a heartbeat for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;

Returns
Type Description
ChangeStreamRecord.HeartbeatRecordOrBuilder

getParserForType()

public Parser<ChangeStreamRecord> getParserForType()
Returns
Type Description
Parser<ChangeStreamRecord>
Overrides

getPartitionEndRecord()

public ChangeStreamRecord.PartitionEndRecord getPartitionEndRecord()

Partition end record describing a terminated change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;

Returns
Type Description
ChangeStreamRecord.PartitionEndRecord

The partitionEndRecord.

getPartitionEndRecordOrBuilder()

public ChangeStreamRecord.PartitionEndRecordOrBuilder getPartitionEndRecordOrBuilder()

Partition end record describing a terminated change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;

Returns
Type Description
ChangeStreamRecord.PartitionEndRecordOrBuilder

getPartitionEventRecord()

public ChangeStreamRecord.PartitionEventRecord getPartitionEventRecord()

Partition event record describing key range changes for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;

Returns
Type Description
ChangeStreamRecord.PartitionEventRecord

The partitionEventRecord.

getPartitionEventRecordOrBuilder()

public ChangeStreamRecord.PartitionEventRecordOrBuilder getPartitionEventRecordOrBuilder()

Partition event record describing key range changes for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;

Returns
Type Description
ChangeStreamRecord.PartitionEventRecordOrBuilder

getPartitionStartRecord()

public ChangeStreamRecord.PartitionStartRecord getPartitionStartRecord()

Partition start record describing a new change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;

Returns
Type Description
ChangeStreamRecord.PartitionStartRecord

The partitionStartRecord.

getPartitionStartRecordOrBuilder()

public ChangeStreamRecord.PartitionStartRecordOrBuilder getPartitionStartRecordOrBuilder()

Partition start record describing a new change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;

Returns
Type Description
ChangeStreamRecord.PartitionStartRecordOrBuilder

getRecordCase()

public ChangeStreamRecord.RecordCase getRecordCase()
Returns
Type Description
ChangeStreamRecord.RecordCase

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasDataChangeRecord()

public boolean hasDataChangeRecord()

Data change record describing a data change for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;

Returns
Type Description
boolean

Whether the dataChangeRecord field is set.

hasHeartbeatRecord()

public boolean hasHeartbeatRecord()

Heartbeat record describing a heartbeat for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;

Returns
Type Description
boolean

Whether the heartbeatRecord field is set.

hasPartitionEndRecord()

public boolean hasPartitionEndRecord()

Partition end record describing a terminated change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;

Returns
Type Description
boolean

Whether the partitionEndRecord field is set.

hasPartitionEventRecord()

public boolean hasPartitionEventRecord()

Partition event record describing key range changes for a change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;

Returns
Type Description
boolean

Whether the partitionEventRecord field is set.

hasPartitionStartRecord()

public boolean hasPartitionStartRecord()

Partition start record describing a new change stream partition.

.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;

Returns
Type Description
boolean

Whether the partitionStartRecord 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.Builder newBuilderForType()
Returns
Type Description
ChangeStreamRecord.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ChangeStreamRecord.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ChangeStreamRecord.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.Builder toBuilder()
Returns
Type Description
ChangeStreamRecord.Builder

writeTo(CodedOutputStream output)

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