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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["The `DataConnection` class provides an interface for connecting to the Cloud Bigtable Data API, featuring pure-virtual methods that mirror the user-facing overload sets in the `Table` class."],["This `DataConnection` class uses a connection pool of gRPC channels to connect to the Cloud Bigtable service, which are reused for efficiency, and the number of channels in the pool can be configured."],["The class supports a range of operations including reading rows (`ReadRows`, `ReadRow`), applying mutations (`Apply`, `BulkApply`), and checking/mutating rows conditionally (`CheckAndMutateRow`), among other functions, and there are both synchronous and asynchronous versions for several of the functions."],["The `DataConnection` class is designed for reuse, and there are functions to control the refresh of channels, like `MinConnectionRefreshOption` and `MaxConnectionRefreshOption`, as well as configuring the amount of gRPC channels."],["The latest version of the `DataConnection` API in this document is 2.37.0-rc, and there are numerous previous versions available for reference, ranging all the way back to version 2.11.0."]]],[]]