@InternalApi public class ReadRowsResumptionStrategy<RowT> extends Object implements StreamResumptionStrategy<com.google.bigtable.v2.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() |
StreamResumptionStrategy<com.google.bigtable.v2.ReadRowsRequest,RowT> |
createNew() |
com.google.bigtable.v2.ReadRowsRequest |
getResumeRequest(com.google.bigtable.v2.ReadRowsRequest originalRequest) |
RowT |
processResponse(RowT response) |
public ReadRowsResumptionStrategy(RowAdapter<RowT> rowAdapter)
public boolean canResume()
canResume in interface StreamResumptionStrategy<com.google.bigtable.v2.ReadRowsRequest,RowT>public StreamResumptionStrategy<com.google.bigtable.v2.ReadRowsRequest,RowT> createNew()
createNew in interface StreamResumptionStrategy<com.google.bigtable.v2.ReadRowsRequest,RowT>public RowT processResponse(RowT response)
processResponse in interface StreamResumptionStrategy<com.google.bigtable.v2.ReadRowsRequest,RowT>public com.google.bigtable.v2.ReadRowsRequest getResumeRequest(com.google.bigtable.v2.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 StreamResumptionStrategy<com.google.bigtable.v2.ReadRowsRequest,RowT>Copyright © 2019 Google LLC. All rights reserved.