@InternalApi public class ReadRowsResumptionStrategy<RowT> extends Object implements com.google.api.gax.retrying.StreamResumptionStrategy<ReadRowsRequest,RowT>
StreamResumptionStrategy for merged rows. This class tracks the
last complete row seen 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 and Description |
|---|
ReadRowsResumptionStrategy(RowAdapter<RowT> rowAdapter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canResume() |
com.google.api.gax.retrying.StreamResumptionStrategy<ReadRowsRequest,RowT> |
createNew() |
ReadRowsRequest |
getResumeRequest(ReadRowsRequest originalRequest) |
RowT |
processResponse(RowT response) |
public ReadRowsResumptionStrategy(RowAdapter<RowT> rowAdapter)
public boolean canResume()
canResume in interface com.google.api.gax.retrying.StreamResumptionStrategy<ReadRowsRequest,RowT>public com.google.api.gax.retrying.StreamResumptionStrategy<ReadRowsRequest,RowT> createNew()
createNew in interface com.google.api.gax.retrying.StreamResumptionStrategy<ReadRowsRequest,RowT>public RowT processResponse(RowT response)
processResponse in interface com.google.api.gax.retrying.StreamResumptionStrategy<ReadRowsRequest,RowT>public ReadRowsRequest getResumeRequest(ReadRowsRequest originalRequest)
Given a request, this implementation will narrow that request to exclude all row keys and
ranges that would produce rows that come before lastKey. Furthermore this
implementation takes care to update the row limit of the request to account for all of the
received rows.
getResumeRequest in interface com.google.api.gax.retrying.StreamResumptionStrategy<ReadRowsRequest,RowT>Copyright © 2018 Google LLC. All rights reserved.