Google Cloud Bigtable C++ Client  0.11.0
A C++ Client Library for Google Cloud Bigtable
Public Member Functions | Friends | List of all members
google::cloud::bigtable::v0::DataClient Class Referenceabstract

Connects to Cloud Bigtable's data manipulation APIs. More...

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

Public Member Functions

virtual ~DataClient ()=default
 
virtual std::string const & project_id () const =0
 
virtual std::string const & instance_id () const =0
 
virtual std::shared_ptr< grpc::Channel > Channel ()=0
 Return a new channel to handle admin operations. More...
 
virtual void reset ()=0
 Reset and create new Channels. More...
 

Protected Member Functions

the `google.bigtable.v2.Bigtable` wrappers.
virtual grpc::Status MutateRow (grpc::ClientContext *context, google::bigtable::v2::MutateRowRequest const &request, google::bigtable::v2::MutateRowResponse *response)=0
 
virtual std::unique_ptr< grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::MutateRowResponse > > AsyncMutateRow (grpc::ClientContext *context, google::bigtable::v2::MutateRowRequest const &request, grpc::CompletionQueue *cq)=0
 
virtual grpc::Status CheckAndMutateRow (grpc::ClientContext *context, google::bigtable::v2::CheckAndMutateRowRequest const &request, google::bigtable::v2::CheckAndMutateRowResponse *response)=0
 
virtual std::unique_ptr< grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::CheckAndMutateRowResponse > > AsyncCheckAndMutateRow (grpc::ClientContext *context, const google::bigtable::v2::CheckAndMutateRowRequest &request, grpc::CompletionQueue *cq)=0
 
virtual grpc::Status ReadModifyWriteRow (grpc::ClientContext *context, google::bigtable::v2::ReadModifyWriteRowRequest const &request, google::bigtable::v2::ReadModifyWriteRowResponse *response)=0
 
virtual std::unique_ptr< grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::ReadModifyWriteRowResponse > > AsyncReadModifyWriteRow (grpc::ClientContext *context, google::bigtable::v2::ReadModifyWriteRowRequest const &request, grpc::CompletionQueue *cq)=0
 
virtual std::unique_ptr< grpc::ClientReaderInterface< google::bigtable::v2::ReadRowsResponse > > ReadRows (grpc::ClientContext *context, google::bigtable::v2::ReadRowsRequest const &request)=0
 
virtual std::unique_ptr< grpc::ClientAsyncReaderInterface< google::bigtable::v2::ReadRowsResponse > > AsyncReadRows (grpc::ClientContext *context, const google::bigtable::v2::ReadRowsRequest &request, grpc::CompletionQueue *cq, void *tag)=0
 
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::ReadRowsResponse > > PrepareAsyncReadRows (::grpc::ClientContext *context, const ::google::bigtable::v2::ReadRowsRequest &request, ::grpc::CompletionQueue *cq)=0
 
virtual std::unique_ptr< grpc::ClientReaderInterface< google::bigtable::v2::SampleRowKeysResponse > > SampleRowKeys (grpc::ClientContext *context, google::bigtable::v2::SampleRowKeysRequest const &request)=0
 
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::SampleRowKeysResponse > > AsyncSampleRowKeys (::grpc::ClientContext *context, const ::google::bigtable::v2::SampleRowKeysRequest &request, ::grpc::CompletionQueue *cq, void *tag)=0
 
virtual std::unique_ptr< grpc::ClientReaderInterface< google::bigtable::v2::MutateRowsResponse > > MutateRows (grpc::ClientContext *context, google::bigtable::v2::MutateRowsRequest const &request)=0
 
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::MutateRowsResponse > > AsyncMutateRows (::grpc::ClientContext *context, const ::google::bigtable::v2::MutateRowsRequest &request, ::grpc::CompletionQueue *cq, void *tag)=0
 
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::MutateRowsResponse > > PrepareAsyncMutateRows (::grpc::ClientContext *context, const ::google::bigtable::v2::MutateRowsRequest &request, ::grpc::CompletionQueue *cq)=0
 

Friends

class Table
 
class RowReader
 
template<typename RowFunctor , typename FinishFunctor >
class AsyncRowReader
 

Detailed Description

Connects to Cloud Bigtable's data manipulation APIs.

This class is used by the Cloud Bigtable wrappers to access Cloud Bigtable. Multiple bigtable::Table objects may share a connection via a single DataClient object. The DataClient object is configured at construction time, this configuration includes the credentials, access endpoints, default timeouts, and other gRPC configuration options. This is an interface class because it is also used as a dependency injection point in some of the tests.

Cost
Applications should avoid unnecessarily creating new objects of type DataClient. Creating a new object of this type typically requires connecting to the Cloud Bigtable servers, and performing the authentication workflows with Google Cloud Platform. These operations can take many milliseconds, therefore applications should try to reuse the same DataClient instances when possible.

Definition at line 61 of file data_client.h.

Constructor & Destructor Documentation

◆ ~DataClient()

virtual google::cloud::bigtable::v0::DataClient::~DataClient ( )
virtualdefault

Member Function Documentation

◆ AsyncCheckAndMutateRow()

virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::CheckAndMutateRowResponse> > google::cloud::bigtable::v0::DataClient::AsyncCheckAndMutateRow ( grpc::ClientContext *  context,
const google::bigtable::v2::CheckAndMutateRowRequest &  request,
grpc::CompletionQueue *  cq 
)
protectedpure virtual

◆ AsyncMutateRow()

virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::MutateRowResponse> > google::cloud::bigtable::v0::DataClient::AsyncMutateRow ( grpc::ClientContext *  context,
google::bigtable::v2::MutateRowRequest const &  request,
grpc::CompletionQueue *  cq 
)
protectedpure virtual

◆ AsyncMutateRows()

virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::MutateRowsResponse> > google::cloud::bigtable::v0::DataClient::AsyncMutateRows ( ::grpc::ClientContext *  context,
const ::google::bigtable::v2::MutateRowsRequest &  request,
::grpc::CompletionQueue *  cq,
void *  tag 
)
protectedpure virtual

◆ AsyncReadModifyWriteRow()

virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::ReadModifyWriteRowResponse> > google::cloud::bigtable::v0::DataClient::AsyncReadModifyWriteRow ( grpc::ClientContext *  context,
google::bigtable::v2::ReadModifyWriteRowRequest const &  request,
grpc::CompletionQueue *  cq 
)
protectedpure virtual

◆ AsyncReadRows()

virtual std::unique_ptr< grpc::ClientAsyncReaderInterface<google::bigtable::v2::ReadRowsResponse> > google::cloud::bigtable::v0::DataClient::AsyncReadRows ( grpc::ClientContext *  context,
const google::bigtable::v2::ReadRowsRequest &  request,
grpc::CompletionQueue *  cq,
void *  tag 
)
protectedpure virtual

◆ AsyncSampleRowKeys()

virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::SampleRowKeysResponse> > google::cloud::bigtable::v0::DataClient::AsyncSampleRowKeys ( ::grpc::ClientContext *  context,
const ::google::bigtable::v2::SampleRowKeysRequest &  request,
::grpc::CompletionQueue *  cq,
void *  tag 
)
protectedpure virtual

◆ Channel()

virtual std::shared_ptr<grpc::Channel> google::cloud::bigtable::v0::DataClient::Channel ( )
pure virtual

Return a new channel to handle admin operations.

Intended to access rarely used services in the same endpoints as the Bigtable admin interfaces, for example, the google.longrunning.Operations.

◆ CheckAndMutateRow()

virtual grpc::Status google::cloud::bigtable::v0::DataClient::CheckAndMutateRow ( grpc::ClientContext *  context,
google::bigtable::v2::CheckAndMutateRowRequest const &  request,
google::bigtable::v2::CheckAndMutateRowResponse *  response 
)
protectedpure virtual

◆ instance_id()

virtual std::string const& google::cloud::bigtable::v0::DataClient::instance_id ( ) const
pure virtual

◆ MutateRow()

virtual grpc::Status google::cloud::bigtable::v0::DataClient::MutateRow ( grpc::ClientContext *  context,
google::bigtable::v2::MutateRowRequest const &  request,
google::bigtable::v2::MutateRowResponse *  response 
)
protectedpure virtual

◆ MutateRows()

virtual std::unique_ptr< grpc::ClientReaderInterface<google::bigtable::v2::MutateRowsResponse> > google::cloud::bigtable::v0::DataClient::MutateRows ( grpc::ClientContext *  context,
google::bigtable::v2::MutateRowsRequest const &  request 
)
protectedpure virtual

◆ PrepareAsyncMutateRows()

virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::MutateRowsResponse> > google::cloud::bigtable::v0::DataClient::PrepareAsyncMutateRows ( ::grpc::ClientContext *  context,
const ::google::bigtable::v2::MutateRowsRequest &  request,
::grpc::CompletionQueue *  cq 
)
protectedpure virtual

◆ PrepareAsyncReadRows()

virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< ::google::bigtable::v2::ReadRowsResponse> > google::cloud::bigtable::v0::DataClient::PrepareAsyncReadRows ( ::grpc::ClientContext *  context,
const ::google::bigtable::v2::ReadRowsRequest &  request,
::grpc::CompletionQueue *  cq 
)
protectedpure virtual

◆ project_id()

virtual std::string const& google::cloud::bigtable::v0::DataClient::project_id ( ) const
pure virtual

◆ ReadModifyWriteRow()

virtual grpc::Status google::cloud::bigtable::v0::DataClient::ReadModifyWriteRow ( grpc::ClientContext *  context,
google::bigtable::v2::ReadModifyWriteRowRequest const &  request,
google::bigtable::v2::ReadModifyWriteRowResponse *  response 
)
protectedpure virtual

◆ ReadRows()

virtual std::unique_ptr< grpc::ClientReaderInterface<google::bigtable::v2::ReadRowsResponse> > google::cloud::bigtable::v0::DataClient::ReadRows ( grpc::ClientContext *  context,
google::bigtable::v2::ReadRowsRequest const &  request 
)
protectedpure virtual

◆ reset()

virtual void google::cloud::bigtable::v0::DataClient::reset ( )
pure virtual

Reset and create new Channels.

Currently this is only used in testing. In the future, we expect this, or a similar member function, will be needed to handle errors that require a new connection, or an explicit refresh of the credentials.

◆ SampleRowKeys()

virtual std::unique_ptr< grpc::ClientReaderInterface<google::bigtable::v2::SampleRowKeysResponse> > google::cloud::bigtable::v0::DataClient::SampleRowKeys ( grpc::ClientContext *  context,
google::bigtable::v2::SampleRowKeysRequest const &  request 
)
protectedpure virtual

Friends And Related Function Documentation

◆ AsyncRowReader

template<typename RowFunctor , typename FinishFunctor >
friend class AsyncRowReader
friend

Definition at line 97 of file data_client.h.

◆ RowReader

friend class RowReader
friend

Definition at line 95 of file data_client.h.

◆ Table

friend class Table
friend

Definition at line 90 of file data_client.h.