Cloud Bigtable V2 Client - Class DataChange (1.24.1)

Reference documentation and code samples for the Cloud Bigtable V2 Client class DataChange.

A message corresponding to one or more mutations to the partition being streamed. A single logical DataChange message may also be split across a sequence of multiple individual messages. Messages other than the first in a sequence will only have the type and chunks fields populated, with the final message in the sequence also containing done set to true.

Generated from protobuf message google.bigtable.v2.ReadChangeStreamResponse.DataChange

Namespace

Google \ Cloud \ Bigtable \ V2 \ ReadChangeStreamResponse

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ type int

The type of the mutation.

↳ source_cluster_id string

The cluster where the mutation was applied. Not set when type is GARBAGE_COLLECTION.

↳ row_key string

The row key for all mutations that are part of this DataChange. If the DataChange is chunked across multiple messages, then this field will only be set for the first message.

↳ commit_timestamp Google\Protobuf\Timestamp

The timestamp at which the mutation was applied on the Bigtable server.

↳ tiebreaker int

A value that lets stream consumers reconstruct Bigtable's conflict resolution semantics. https://cloud.google.com/bigtable/docs/writes#conflict-resolution In the event that the same row key, column family, column qualifier, timestamp are modified on different clusters at the same commit_timestamp, the mutation with the larger tiebreaker will be the one chosen for the eventually consistent state of the system.

↳ chunks array<Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>

The mutations associated with this change to the partition. May contain complete mutations or chunks of a multi-message chunked DataChange record.

↳ done bool

When true, indicates that the entire DataChange has been read and the client can safely process the message.

↳ token string

An encoded position for this stream's partition to restart reading from. This token is for the StreamPartition from the request.

↳ estimated_low_watermark Google\Protobuf\Timestamp

An estimate of the commit timestamp that is usually lower than or equal to any timestamp for a record that will be delivered in the future on the stream. It is possible that, under particular circumstances that a future record has a timestamp is is lower than a previously seen timestamp. For an example usage see https://beam.apache.org/documentation/basics/#watermarks

getType

The type of the mutation.

Returns
TypeDescription
int

setType

The type of the mutation.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSourceClusterId

The cluster where the mutation was applied.

Not set when type is GARBAGE_COLLECTION.

Returns
TypeDescription
string

setSourceClusterId

The cluster where the mutation was applied.

Not set when type is GARBAGE_COLLECTION.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRowKey

The row key for all mutations that are part of this DataChange.

If the DataChange is chunked across multiple messages, then this field will only be set for the first message.

Returns
TypeDescription
string

setRowKey

The row key for all mutations that are part of this DataChange.

If the DataChange is chunked across multiple messages, then this field will only be set for the first message.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCommitTimestamp

The timestamp at which the mutation was applied on the Bigtable server.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCommitTimestamp

clearCommitTimestamp

setCommitTimestamp

The timestamp at which the mutation was applied on the Bigtable server.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getTiebreaker

A value that lets stream consumers reconstruct Bigtable's conflict resolution semantics.

https://cloud.google.com/bigtable/docs/writes#conflict-resolution In the event that the same row key, column family, column qualifier, timestamp are modified on different clusters at the same commit_timestamp, the mutation with the larger tiebreaker will be the one chosen for the eventually consistent state of the system.

Returns
TypeDescription
int

setTiebreaker

A value that lets stream consumers reconstruct Bigtable's conflict resolution semantics.

https://cloud.google.com/bigtable/docs/writes#conflict-resolution In the event that the same row key, column family, column qualifier, timestamp are modified on different clusters at the same commit_timestamp, the mutation with the larger tiebreaker will be the one chosen for the eventually consistent state of the system.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getChunks

The mutations associated with this change to the partition.

May contain complete mutations or chunks of a multi-message chunked DataChange record.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setChunks

The mutations associated with this change to the partition.

May contain complete mutations or chunks of a multi-message chunked DataChange record.

Parameter
NameDescription
var array<Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>
Returns
TypeDescription
$this

getDone

When true, indicates that the entire DataChange has been read and the client can safely process the message.

Returns
TypeDescription
bool

setDone

When true, indicates that the entire DataChange has been read and the client can safely process the message.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getToken

An encoded position for this stream's partition to restart reading from.

This token is for the StreamPartition from the request.

Returns
TypeDescription
string

setToken

An encoded position for this stream's partition to restart reading from.

This token is for the StreamPartition from the request.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEstimatedLowWatermark

An estimate of the commit timestamp that is usually lower than or equal to any timestamp for a record that will be delivered in the future on the stream. It is possible that, under particular circumstances that a future record has a timestamp is is lower than a previously seen timestamp. For an example usage see https://beam.apache.org/documentation/basics/#watermarks

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasEstimatedLowWatermark

clearEstimatedLowWatermark

setEstimatedLowWatermark

An estimate of the commit timestamp that is usually lower than or equal to any timestamp for a record that will be delivered in the future on the stream. It is possible that, under particular circumstances that a future record has a timestamp is is lower than a previously seen timestamp. For an example usage see https://beam.apache.org/documentation/basics/#watermarks

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this