Class ReadChangeStreamQuery
- java.lang.Object
-
- com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery
-
- All Implemented Interfaces:
Serializable,Cloneable
@InternalApi("Intended for use by the BigtableIO in apache/beam only.") public final class ReadChangeStreamQuery extends Object implements Serializable, CloneableA simple wrapper to construct a query for the ReadChangeStream RPC.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ReadChangeStreamQueryclone()ReadChangeStreamQuerycontinuationTokens(List<ChangeStreamContinuationToken> changeStreamContinuationTokens)Sets the stream continuation tokens to read the change stream.static ReadChangeStreamQuerycreate(String tableId)Constructs a new ReadChangeStreamQuery object for the specified table id.ReadChangeStreamQueryendTime(org.threeten.bp.Instant value)Sets the endTime to read the change stream.booleanequals(Object o)static ReadChangeStreamQueryfromProto(ReadChangeStreamRequest request)Wraps the protobufReadChangeStreamRequest.inthashCode()ReadChangeStreamQueryheartbeatDuration(org.threeten.bp.Duration duration)Sets the heartbeat duration for the change stream.ReadChangeStreamQuerystartTime(org.threeten.bp.Instant value)Sets the startTime to read the change stream.ReadChangeStreamQuerystreamPartition(RowRange rowRange)Adds a partition.ReadChangeStreamQuerystreamPartition(Range.ByteStringRange range)Adds a partition.ReadChangeStreamQuerystreamPartition(com.google.protobuf.ByteString start, com.google.protobuf.ByteString end)Adds a partition.ReadChangeStreamQuerystreamPartition(String start, String end)Adds a partition.ReadChangeStreamRequesttoProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)Creates the request protobuf.StringtoString()
-
-
-
Method Detail
-
create
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 theBigtableDataSettings.
-
streamPartition
public ReadChangeStreamQuery streamPartition(@Nonnull RowRange rowRange)
Adds a partition.- Parameters:
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.
-
streamPartition
public ReadChangeStreamQuery streamPartition(String start, String end)
Adds a partition.- Parameters:
start- The beginning of the range (inclusive). Can be null to represent negative infinity.end- The end of the range (exclusive). Can be null to represent positive infinity.
-
streamPartition
public ReadChangeStreamQuery streamPartition(@Nullable com.google.protobuf.ByteString start, @Nullable com.google.protobuf.ByteString end)
Adds a partition.- Parameters:
start- The beginning of the range (inclusive). Can be null to represent negative infinity.end- The end of the range (exclusive). Can be null to represent positive infinity.
-
streamPartition
public ReadChangeStreamQuery streamPartition(Range.ByteStringRange range)
Adds a partition.
-
startTime
public ReadChangeStreamQuery startTime(org.threeten.bp.Instant value)
Sets the startTime to read the change stream.
-
endTime
public ReadChangeStreamQuery endTime(org.threeten.bp.Instant value)
Sets the endTime to read the change stream.
-
continuationTokens
public ReadChangeStreamQuery continuationTokens(List<ChangeStreamContinuationToken> changeStreamContinuationTokens)
Sets the stream continuation tokens to read the change stream.
-
heartbeatDuration
public ReadChangeStreamQuery heartbeatDuration(org.threeten.bp.Duration duration)
Sets the heartbeat duration for the change stream.
-
toProto
@InternalApi("Used in Changestream beam pipeline.") public ReadChangeStreamRequest toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)Creates the request protobuf. This method is considered an internal implementation detail and not meant to be used by applications.
-
fromProto
public static ReadChangeStreamQuery fromProto(@Nonnull ReadChangeStreamRequest request)
Wraps the protobufReadChangeStreamRequest.WARNING: Please note that the project id & instance id in the table name will be overwritten by the configuration in the BigtableDataClient.
-
clone
protected ReadChangeStreamQuery clone()
-
-