Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::bigtable::DataConnection Class Referenceabstract

A connection to the Cloud Bigtable Data API. More...

#include <google/cloud/bigtable/data_connection.h>

Public Member Functions

virtual ~DataConnection ()=0
 
virtual Options options ()
 
virtual Status Apply (std::string const &table_name, SingleRowMutation mut)
 
virtual future< StatusAsyncApply (std::string const &table_name, SingleRowMutation mut)
 
virtual std::vector< FailedMutationBulkApply (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< MutationBranchCheckAndMutateRow (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< RowReadModifyWriteRow (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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~DataConnection()

virtual google::cloud::bigtable::DataConnection::~DataConnection ( )
pure virtual

Member Function Documentation

◆ Apply()

virtual Status google::cloud::bigtable::DataConnection::Apply ( std::string const &  table_name,
SingleRowMutation  mut 
)
virtual

◆ AsyncApply()

virtual future< Status > google::cloud::bigtable::DataConnection::AsyncApply ( std::string const &  table_name,
SingleRowMutation  mut 
)
virtual

◆ AsyncBulkApply()

virtual future< std::vector< FailedMutation > > google::cloud::bigtable::DataConnection::AsyncBulkApply ( std::string const &  table_name,
BulkMutation  mut 
)
virtual

◆ AsyncCheckAndMutateRow()

virtual future< StatusOr< MutationBranch > > google::cloud::bigtable::DataConnection::AsyncCheckAndMutateRow ( std::string const &  table_name,
std::string  row_key,
Filter  filter,
std::vector< Mutation true_mutations,
std::vector< Mutation false_mutations 
)
virtual

◆ AsyncReadModifyWriteRow()

virtual future< StatusOr< Row > > google::cloud::bigtable::DataConnection::AsyncReadModifyWriteRow ( google::bigtable::v2::ReadModifyWriteRowRequest  request)
virtual

◆ AsyncReadRow()

virtual future< StatusOr< std::pair< bool, Row > > > google::cloud::bigtable::DataConnection::AsyncReadRow ( std::string const &  table_name,
std::string  row_key,
Filter  filter 
)
virtual

◆ AsyncReadRows()

virtual void google::cloud::bigtable::DataConnection::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

◆ AsyncSampleRows()

virtual future< StatusOr< std::vector< RowKeySample > > > google::cloud::bigtable::DataConnection::AsyncSampleRows ( std::string const &  table_name)
virtual

◆ BulkApply()

virtual std::vector< FailedMutation > google::cloud::bigtable::DataConnection::BulkApply ( std::string const &  table_name,
BulkMutation  mut 
)
virtual

◆ CheckAndMutateRow()

virtual StatusOr< MutationBranch > google::cloud::bigtable::DataConnection::CheckAndMutateRow ( std::string const &  table_name,
std::string  row_key,
Filter  filter,
std::vector< Mutation true_mutations,
std::vector< Mutation false_mutations 
)
virtual

◆ options()

virtual Options google::cloud::bigtable::DataConnection::options ( )
inlinevirtual

◆ ReadModifyWriteRow()

virtual StatusOr< Row > google::cloud::bigtable::DataConnection::ReadModifyWriteRow ( google::bigtable::v2::ReadModifyWriteRowRequest  request)
virtual

◆ ReadRow()

virtual StatusOr< std::pair< bool, Row > > google::cloud::bigtable::DataConnection::ReadRow ( std::string const &  table_name,
std::string  row_key,
Filter  filter 
)
virtual

◆ ReadRows()

virtual RowReader google::cloud::bigtable::DataConnection::ReadRows ( std::string const &  table_name,
RowSet  row_set,
std::int64_t  rows_limit,
Filter  filter 
)
virtual

Prefer to use ReadRowsFull() in mocks.

◆ ReadRowsFull()

virtual RowReader google::cloud::bigtable::DataConnection::ReadRowsFull ( ReadRowsParams  params)
virtual

◆ SampleRows()

virtual StatusOr< std::vector< RowKeySample > > google::cloud::bigtable::DataConnection::SampleRows ( std::string const &  table_name)
virtual