Class ReadChangeStreamQuery (2.23.0)

public final class ReadChangeStreamQuery implements Serializable, Cloneable

A simple wrapper to construct a query for the ReadChangeStream RPC.

Inheritance

Object > ReadChangeStreamQuery

Implements

Serializable, Cloneable

Static Methods

create(String tableId)

public static ReadChangeStreamQuery create(String tableId)

Constructs a new ReadChangeStreamQuery object for the specified table id. The table id will be combined with the instance name specified in the com.google.cloud.bigtable.data.v2.BigtableDataSettings.

Parameter
NameDescription
tableIdString
Returns
TypeDescription
ReadChangeStreamQuery

fromProto(ReadChangeStreamRequest request)

public static ReadChangeStreamQuery fromProto(ReadChangeStreamRequest request)

Wraps the protobuf ReadChangeStreamRequest.

WARNING: Please note that the project id & instance id in the table name will be overwritten by the configuration in the BigtableDataClient.

Parameter
NameDescription
requestcom.google.bigtable.v2.ReadChangeStreamRequest
Returns
TypeDescription
ReadChangeStreamQuery

Methods

clone()

protected ReadChangeStreamQuery clone()
Returns
TypeDescription
ReadChangeStreamQuery
Overrides

continuationTokens(List<ChangeStreamContinuationToken> changeStreamContinuationTokens)

public ReadChangeStreamQuery continuationTokens(List<ChangeStreamContinuationToken> changeStreamContinuationTokens)

Sets the stream continuation tokens to read the change stream.

Parameter
NameDescription
changeStreamContinuationTokensList<ChangeStreamContinuationToken>
Returns
TypeDescription
ReadChangeStreamQuery

endTime(Instant value)

public ReadChangeStreamQuery endTime(Instant value)

Sets the endTime to read the change stream.

Parameter
NameDescription
valueorg.threeten.bp.Instant
Returns
TypeDescription
ReadChangeStreamQuery

equals(Object o)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

heartbeatDuration(Duration duration)

public ReadChangeStreamQuery heartbeatDuration(Duration duration)

Sets the heartbeat duration for the change stream.

Parameter
NameDescription
durationorg.threeten.bp.Duration
Returns
TypeDescription
ReadChangeStreamQuery

startTime(Instant value)

public ReadChangeStreamQuery startTime(Instant value)

Sets the startTime to read the change stream.

Parameter
NameDescription
valueorg.threeten.bp.Instant
Returns
TypeDescription
ReadChangeStreamQuery

streamPartition(RowRange rowRange)

public ReadChangeStreamQuery streamPartition(RowRange rowRange)

Adds a partition.

Parameter
NameDescription
rowRangecom.google.bigtable.v2.RowRange

Represents the partition in the form [startKey, endKey). startKey can be null to represent negative infinity. endKey can be null to represent positive infinity.

Returns
TypeDescription
ReadChangeStreamQuery

streamPartition(Range.ByteStringRange range)

public ReadChangeStreamQuery streamPartition(Range.ByteStringRange range)

Adds a partition.

Parameter
NameDescription
rangeRange.ByteStringRange
Returns
TypeDescription
ReadChangeStreamQuery

streamPartition(ByteString start, ByteString end)

public ReadChangeStreamQuery streamPartition(ByteString start, ByteString end)

Adds a partition.

Parameters
NameDescription
startByteString

The beginning of the range (inclusive). Can be null to represent negative infinity.

endByteString

The end of the range (exclusive). Can be null to represent positive infinity.

Returns
TypeDescription
ReadChangeStreamQuery

streamPartition(String start, String end)

public ReadChangeStreamQuery streamPartition(String start, String end)

Adds a partition.

Parameters
NameDescription
startString

The beginning of the range (inclusive). Can be null to represent negative infinity.

endString

The end of the range (exclusive). Can be null to represent positive infinity.

Returns
TypeDescription
ReadChangeStreamQuery

toProto(RequestContext requestContext)

public ReadChangeStreamRequest toProto(RequestContext requestContext)

Creates the request protobuf. This method is considered an internal implementation detail and not meant to be used by applications.

Parameter
NameDescription
requestContextcom.google.cloud.bigtable.data.v2.internal.RequestContext
Returns
TypeDescription
com.google.bigtable.v2.ReadChangeStreamRequest

toString()

public String toString()
Returns
TypeDescription
String
Overrides