Class ReadChangeStreamResumptionStrategy<ChangeStreamRecordT>

java.lang.Object
com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamResumptionStrategy<ChangeStreamRecordT>
All Implemented Interfaces:
com.google.api.gax.retrying.StreamResumptionStrategy<com.google.bigtable.v2.ReadChangeStreamRequest,ChangeStreamRecordT>

@InternalApi public class ReadChangeStreamResumptionStrategy<ChangeStreamRecordT> extends Object implements com.google.api.gax.retrying.StreamResumptionStrategy<com.google.bigtable.v2.ReadChangeStreamRequest,ChangeStreamRecordT>
An implementation of a StreamResumptionStrategy for change stream records. This class tracks the continuation token and upon retry can build a request to resume the stream from where it left off.

This class is considered an internal implementation detail and not meant to be used by applications.

  • Constructor Details

  • Method Details

    • canResume

      public boolean canResume()
      Specified by:
      canResume in interface com.google.api.gax.retrying.StreamResumptionStrategy<com.google.bigtable.v2.ReadChangeStreamRequest,ChangeStreamRecordT>
    • createNew

      public com.google.api.gax.retrying.StreamResumptionStrategy<com.google.bigtable.v2.ReadChangeStreamRequest,ChangeStreamRecordT> createNew()
      Specified by:
      createNew in interface com.google.api.gax.retrying.StreamResumptionStrategy<com.google.bigtable.v2.ReadChangeStreamRequest,ChangeStreamRecordT>
    • processResponse

      public ChangeStreamRecordT processResponse(ChangeStreamRecordT response)
      Specified by:
      processResponse in interface com.google.api.gax.retrying.StreamResumptionStrategy<com.google.bigtable.v2.ReadChangeStreamRequest,ChangeStreamRecordT>
    • getResumeRequest

      public com.google.bigtable.v2.ReadChangeStreamRequest getResumeRequest(com.google.bigtable.v2.ReadChangeStreamRequest originalRequest)

      Given a request, this implementation will narrow that request to include data changes that come after token.

      Specified by:
      getResumeRequest in interface com.google.api.gax.retrying.StreamResumptionStrategy<com.google.bigtable.v2.ReadChangeStreamRequest,ChangeStreamRecordT>