Class ReadChangeStreamQuery (2.39.5)

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
Name Description
tableId String
Returns
Type Description
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
Name Description
request com.google.bigtable.v2.ReadChangeStreamRequest
Returns
Type Description
ReadChangeStreamQuery

Methods

clone()

protected ReadChangeStreamQuery clone()
Returns
Type Description
ReadChangeStreamQuery
Overrides

continuationTokens(List<ChangeStreamContinuationToken> changeStreamContinuationTokens)

public ReadChangeStreamQuery continuationTokens(List<ChangeStreamContinuationToken> changeStreamContinuationTokens)

Sets the stream continuation tokens to read the change stream.

Parameter
Name Description
changeStreamContinuationTokens List<ChangeStreamContinuationToken>
Returns
Type Description
ReadChangeStreamQuery

endTime(Instant value)

public ReadChangeStreamQuery endTime(Instant value)

Sets the endTime to read the change stream.

Parameter
Name Description
value org.threeten.bp.Instant
Returns
Type Description
ReadChangeStreamQuery

equals(Object o)

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

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

heartbeatDuration(Duration duration)

public ReadChangeStreamQuery heartbeatDuration(Duration duration)

Sets the heartbeat duration for the change stream.

Parameter
Name Description
duration org.threeten.bp.Duration
Returns
Type Description
ReadChangeStreamQuery

startTime(Instant value)

public ReadChangeStreamQuery startTime(Instant value)

Sets the startTime to read the change stream.

Parameter
Name Description
value org.threeten.bp.Instant
Returns
Type Description
ReadChangeStreamQuery

streamPartition(RowRange rowRange)

public ReadChangeStreamQuery streamPartition(RowRange rowRange)

Adds a partition.

Parameter
Name Description
rowRange com.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
Type Description
ReadChangeStreamQuery

streamPartition(Range.ByteStringRange range)

public ReadChangeStreamQuery streamPartition(Range.ByteStringRange range)

Adds a partition.

Parameter
Name Description
range Range.ByteStringRange
Returns
Type Description
ReadChangeStreamQuery

streamPartition(ByteString start, ByteString end)

public ReadChangeStreamQuery streamPartition(ByteString start, ByteString end)

Adds a partition.

Parameters
Name Description
start ByteString

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

end ByteString

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

Returns
Type Description
ReadChangeStreamQuery

streamPartition(String start, String end)

public ReadChangeStreamQuery streamPartition(String start, String end)

Adds a partition.

Parameters
Name Description
start String

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

end String

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

Returns
Type Description
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
Name Description
requestContext com.google.cloud.bigtable.data.v2.internal.RequestContext
Returns
Type Description
com.google.bigtable.v2.ReadChangeStreamRequest

toString()

public String toString()
Returns
Type Description
String
Overrides