15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CLIENT_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CLIENT_H
18#include "google/cloud/bigtable/client_options.h"
19#include "google/cloud/bigtable/completion_queue.h"
20#include "google/cloud/bigtable/row.h"
21#include "google/cloud/bigtable/version.h"
22#include <google/bigtable/v2/bigtable.grpc.pb.h>
28namespace bigtable_internal {
29GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
30class LegacyAsyncRowReader;
32GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
38class AsyncRetryBulkApply;
39class LegacyAsyncRowSampler;
41class LoggingDataClient;
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
70 virtual std::string
const&
project_id()
const = 0;
74
75
76
77
78
79
80
81
82
83
84
85
87 virtual std::shared_ptr<grpc::Channel> Channel() = 0;
90
91
92
93
94
95
97 virtual void reset() = 0;
100
101
102
103
104
105
106
107
108
109
119 friend class internal::AsyncRetryBulkApply;
120 friend class internal::LegacyAsyncRowSampler;
121 friend class internal::BulkMutator;
122 friend class bigtable_internal::LegacyRowReader;
123 friend class bigtable_internal::LegacyAsyncRowReader;
124 friend class internal::LoggingDataClient;
129 grpc::ClientContext* context,
130 google::bigtable::v2::MutateRowRequest
const& request,
131 google::bigtable::v2::MutateRowResponse* response) = 0;
132 virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface<
133 google::bigtable::v2::MutateRowResponse>>
135 google::bigtable::v2::MutateRowRequest
const& request,
136 grpc::CompletionQueue* cq) = 0;
138 grpc::ClientContext* context,
139 google::bigtable::v2::CheckAndMutateRowRequest
const& request,
140 google::bigtable::v2::CheckAndMutateRowResponse* response) = 0;
141 virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface<
142 google::bigtable::v2::CheckAndMutateRowResponse>>
144 grpc::ClientContext* context,
145 google::bigtable::v2::CheckAndMutateRowRequest
const& request,
146 grpc::CompletionQueue* cq) = 0;
148 grpc::ClientContext* context,
149 google::bigtable::v2::ReadModifyWriteRowRequest
const& request,
150 google::bigtable::v2::ReadModifyWriteRowResponse* response) = 0;
151 virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface<
152 google::bigtable::v2::ReadModifyWriteRowResponse>>
154 grpc::ClientContext* context,
155 google::bigtable::v2::ReadModifyWriteRowRequest
const& request,
156 grpc::CompletionQueue* cq) = 0;
157 virtual std::unique_ptr<
158 grpc::ClientReaderInterface<
google::bigtable::v2::ReadRowsResponse>>
159 ReadRows(grpc::ClientContext* context,
160 google::bigtable::v2::ReadRowsRequest
const& request) = 0;
161 virtual std::unique_ptr<
162 grpc::ClientAsyncReaderInterface<
google::bigtable::v2::ReadRowsResponse>>
164 google::bigtable::v2::ReadRowsRequest
const& request,
165 grpc::CompletionQueue* cq,
void* tag) = 0;
166 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
167 google::bigtable::v2::ReadRowsResponse>>
169 google::bigtable::v2::ReadRowsRequest
const& request,
170 grpc::CompletionQueue* cq) = 0;
171 virtual std::unique_ptr<
172 grpc::ClientReaderInterface<
google::bigtable::v2::SampleRowKeysResponse>>
174 google::bigtable::v2::SampleRowKeysRequest
const& request) = 0;
175 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
176 google::bigtable::v2::SampleRowKeysResponse>>
178 google::bigtable::v2::SampleRowKeysRequest
const& request,
179 grpc::CompletionQueue* cq,
void* tag) = 0;
180 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
181 google::bigtable::v2::SampleRowKeysResponse>>
183 grpc::ClientContext* context,
184 google::bigtable::v2::SampleRowKeysRequest
const& request,
185 grpc::CompletionQueue* cq);
186 virtual std::unique_ptr<
187 grpc::ClientReaderInterface<
google::bigtable::v2::MutateRowsResponse>>
189 google::bigtable::v2::MutateRowsRequest
const& request) = 0;
190 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
191 google::bigtable::v2::MutateRowsResponse>>
193 google::bigtable::v2::MutateRowsRequest
const& request,
194 grpc::CompletionQueue* cq,
void* tag) = 0;
195 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
196 google::bigtable::v2::MutateRowsResponse>>
198 google::bigtable::v2::MutateRowsRequest
const& request,
199 grpc::CompletionQueue* cq) = 0;
205 std::string instance_id,
209
210
211
212
213
214GOOGLE_CLOUD_CPP_DEPRECATED(
"use `MakeDataClient` instead")
216 std::string instance_id,
220
221
222
223
224
226 return "projects/" + client->
project_id() +
"/instances/" +
230GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Configuration options for the Bigtable Client.
Definition: client_options.h:55
Connects to Cloud Bigtable's data manipulation APIs.
Definition: data_client.h:66
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::ReadRowsResponse > > PrepareAsyncReadRows(::grpc::ClientContext *context, google::bigtable::v2::ReadRowsRequest const &request, grpc::CompletionQueue *cq)=0
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::SampleRowKeysResponse > > AsyncSampleRowKeys(grpc::ClientContext *context, google::bigtable::v2::SampleRowKeysRequest const &request, grpc::CompletionQueue *cq, void *tag)=0
virtual std::string const & instance_id() const =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::MutateRowsResponse > > AsyncMutateRows(::grpc::ClientContext *context, google::bigtable::v2::MutateRowsRequest const &request, grpc::CompletionQueue *cq, void *tag)=0
virtual ~DataClient()=default
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::SampleRowKeysResponse > > PrepareAsyncSampleRowKeys(grpc::ClientContext *context, google::bigtable::v2::SampleRowKeysRequest const &request, grpc::CompletionQueue *cq)
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 std::string const & project_id() const =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::ClientReaderInterface< google::bigtable::v2::MutateRowsResponse > > MutateRows(grpc::ClientContext *context, google::bigtable::v2::MutateRowsRequest const &request)=0
virtual google::cloud::BackgroundThreadsFactory BackgroundThreadsFactory()=0
The thread factory this client was created with.
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 void reset()=0
Reset and create new Channels.
virtual grpc::Status CheckAndMutateRow(grpc::ClientContext *context, google::bigtable::v2::CheckAndMutateRowRequest const &request, google::bigtable::v2::CheckAndMutateRowResponse *response)=0
virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::MutateRowsResponse > > PrepareAsyncMutateRows(grpc::ClientContext *context, google::bigtable::v2::MutateRowsRequest const &request, grpc::CompletionQueue *cq)=0
virtual grpc::Status MutateRow(grpc::ClientContext *context, google::bigtable::v2::MutateRowRequest const &request, google::bigtable::v2::MutateRowResponse *response)=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::CheckAndMutateRowResponse > > AsyncCheckAndMutateRow(grpc::ClientContext *context, google::bigtable::v2::CheckAndMutateRowRequest const &request, grpc::CompletionQueue *cq)=0
virtual std::unique_ptr< grpc::ClientAsyncReaderInterface< google::bigtable::v2::ReadRowsResponse > > AsyncReadRows(grpc::ClientContext *context, google::bigtable::v2::ReadRowsRequest const &request, grpc::CompletionQueue *cq, void *tag)=0
The main interface to interact with data in a Cloud Bigtable table.
Definition: table.h:166
Contains all the Cloud Bigtable C++ client APIs.
Definition: admin_client.h:28
std::string InstanceName(std::shared_ptr< DataClient > const &client)
Return the fully qualified instance name for the client.
Definition: data_client.h:225
std::shared_ptr< DataClient > CreateDefaultDataClient(std::string project_id, std::string instance_id, ClientOptions options)
Create a new data client configured via options.
std::shared_ptr< DataClient > MakeDataClient(std::string project_id, std::string instance_id, Options options={})
Create a new data client configured via options.
#define GOOGLE_CLOUD_CPP_BIGTABLE_DATA_CLIENT_DEPRECATED(name)
Definition: version.h:22