Cloud Bigtable V2 Client - Class DataChange (2.2.0)

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
Name Description
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
Type Description
int

setType

The type of the mutation.

Parameter
Name Description
var int
Returns
Type Description
$this

getSourceClusterId

The cluster where the mutation was applied.

Not set when type is GARBAGE_COLLECTION.

Returns
Type Description
string

setSourceClusterId

The cluster where the mutation was applied.

Not set when type is GARBAGE_COLLECTION.

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$this

getCommitTimestamp

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

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCommitTimestamp

clearCommitTimestamp

setCommitTimestamp

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

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$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
Type Description
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
Name Description
var int
Returns
Type Description
$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
Type Description
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
Name Description
var array<Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>
Returns
Type Description
$this

getDone

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

Returns
Type Description
bool

setDone

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

Parameter
Name Description
var bool
Returns
Type Description
$this

getToken

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

This token is for the StreamPartition from the request.

Returns
Type Description
string

setToken

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

This token is for the StreamPartition from the request.

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this