public class ChangeStreamDao
extends java.lang.Object
ResultSet
, which can be consumed until the stream is finished.Modifier and Type | Method and Description |
---|---|
ChangeStreamResultSet |
changeStreamQuery(java.lang.String partitionToken,
com.google.cloud.Timestamp startTimestamp,
com.google.cloud.Timestamp endTimestamp,
long heartbeatMillis)
Performs a change stream query.
|
public ChangeStreamResultSet changeStreamQuery(java.lang.String partitionToken, com.google.cloud.Timestamp startTimestamp, com.google.cloud.Timestamp endTimestamp, long heartbeatMillis)
"job=<jobName>"
. The result will be given as a ChangeStreamResultSet
which can be
consumed as a stream, yielding records until no more are available for the query made. Note
that one needs to call ChangeStreamResultSet.next()
to initiate the change stream
query.partitionToken
- the unique partition token to be queried. If InitialPartition.PARTITION_TOKEN
is given, null will be used in the change stream query
instead.startTimestamp
- the inclusive start time for the change stream queryendTimestamp
- the inclusive end time for the change stream queryheartbeatMillis
- the number of milliseconds after the stream is idle, which a heartbeat
record will be emitted in the change stream queryChangeStreamResultSet
that will produce a stream of records for the change
stream query