|
virtual | ~DataConnection ()=0 |
|
virtual Options | options () |
|
virtual Status | Apply (std::string const &table_name, SingleRowMutation mut) |
|
virtual future< Status > | AsyncApply (std::string const &table_name, SingleRowMutation mut) |
|
virtual std::vector< FailedMutation > | BulkApply (std::string const &table_name, BulkMutation mut) |
|
virtual future< std::vector< FailedMutation > > | AsyncBulkApply (std::string const &table_name, BulkMutation mut) |
|
virtual RowReader | ReadRows (std::string const &table_name, RowSet row_set, std::int64_t rows_limit, Filter filter) |
| Prefer to use ReadRowsFull() in mocks. More...
|
|
virtual RowReader | ReadRowsFull (ReadRowsParams params) |
|
virtual StatusOr< std::pair< bool, Row > > | ReadRow (std::string const &table_name, std::string row_key, Filter filter) |
|
virtual StatusOr< MutationBranch > | CheckAndMutateRow (std::string const &table_name, std::string row_key, Filter filter, std::vector< Mutation > true_mutations, std::vector< Mutation > false_mutations) |
|
virtual future< StatusOr< MutationBranch > > | AsyncCheckAndMutateRow (std::string const &table_name, std::string row_key, Filter filter, std::vector< Mutation > true_mutations, std::vector< Mutation > false_mutations) |
|
virtual StatusOr< std::vector< RowKeySample > > | SampleRows (std::string const &table_name) |
|
virtual future< StatusOr< std::vector< RowKeySample > > > | AsyncSampleRows (std::string const &table_name) |
|
virtual StatusOr< Row > | ReadModifyWriteRow (google::bigtable::v2::ReadModifyWriteRowRequest request) |
|
virtual future< StatusOr< Row > > | AsyncReadModifyWriteRow (google::bigtable::v2::ReadModifyWriteRowRequest request) |
|
virtual void | AsyncReadRows (std::string const &table_name, std::function< future< bool >(Row)> on_row, std::function< void(Status)> on_finish, RowSet row_set, std::int64_t rows_limit, Filter filter) |
|
virtual future< StatusOr< std::pair< bool, Row > > > | AsyncReadRow (std::string const &table_name, std::string row_key, Filter filter) |
|
A connection to the Cloud Bigtable Data API.
This interface defines pure-virtual methods for each of the user-facing overload sets in Table
. This allows users to inject custom behavior (e.g., with a Google Mock object) in a Table
object for use in their own tests.
To create a concrete instance, see MakeDataConnection()
.
For mocking, see bigtable_mocks::MockDataConnection
.
- Connection Pool
- This class opens a number of gRPC Channels upon its construction. These channels each initiate a connection to the Cloud Bigtable service. This is a relatively slow operation that can take milliseconds, so applications are advised to reuse
DataConnection
objects when possible.
The exact number of channels can be configured with the google::cloud::GrpcNumChannelsOption
. If this option is not set, the class creates between 1 and 64 channels. The specific algorithm and number of channels is an implementation detail, and subject to change without notice.
Each request sent from the client library cycles through the channels in the connection pool in a round robin fashion.
Unused gRPC channels can enter an idle state. Refreshing them during a request may incur additional latency. To avoid this, the client library keeps connections open by refreshing the channels in a background thread. Advanced users can configure the frequency of the refreshes, or disable this feature, by using bigtable::MinConnectionRefreshOption
and bigtable::MaxConnectionRefreshOption
.