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<ReadChangeStreamRequest,ChangeStreamRecordT>
@InternalApi
public class ReadChangeStreamResumptionStrategy<ChangeStreamRecordT>
extends Object
implements com.google.api.gax.retrying.StreamResumptionStrategy<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 Summary
ConstructorsConstructorDescriptionReadChangeStreamResumptionStrategy(ChangeStreamRecordAdapter<ChangeStreamRecordT> changeStreamRecordAdapter) -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.api.gax.retrying.StreamResumptionStrategy<ReadChangeStreamRequest,ChangeStreamRecordT> getResumeRequest(ReadChangeStreamRequest originalRequest) processResponse(ChangeStreamRecordT response)
-
Constructor Details
-
ReadChangeStreamResumptionStrategy
public ReadChangeStreamResumptionStrategy(ChangeStreamRecordAdapter<ChangeStreamRecordT> changeStreamRecordAdapter)
-
-
Method Details
-
canResume
public boolean canResume()- Specified by:
canResumein interfacecom.google.api.gax.retrying.StreamResumptionStrategy<ReadChangeStreamRequest,ChangeStreamRecordT>
-
createNew
public com.google.api.gax.retrying.StreamResumptionStrategy<ReadChangeStreamRequest,ChangeStreamRecordT> createNew()- Specified by:
createNewin interfacecom.google.api.gax.retrying.StreamResumptionStrategy<ReadChangeStreamRequest,ChangeStreamRecordT>
-
processResponse
- Specified by:
processResponsein interfacecom.google.api.gax.retrying.StreamResumptionStrategy<ReadChangeStreamRequest,ChangeStreamRecordT>
-
getResumeRequest
Given a request, this implementation will narrow that request to include data changes that come after
token.- Specified by:
getResumeRequestin interfacecom.google.api.gax.retrying.StreamResumptionStrategy<ReadChangeStreamRequest,ChangeStreamRecordT>
-