1616#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CONNECTION_H
1717
1818#include " google/cloud/bigtable/filters.h"
19+ #include " google/cloud/bigtable/instance_resource.h"
1920#include " google/cloud/bigtable/internal/bigtable_stub.h"
2021#include " google/cloud/bigtable/mutation_branch.h"
2122#include " google/cloud/bigtable/mutations.h"
3334#include " google/cloud/stream_range.h"
3435#include " google/cloud/version.h"
3536#include < memory>
37+ #include < vector>
3638
3739namespace google {
3840namespace cloud {
@@ -168,6 +170,10 @@ class DataConnection {
168170 * Returns a `DataConnection` object that can be used for interacting with
169171 * the Cloud Bigtable Data API.
170172 *
173+ * Calling this function with a list of target @p instances automatically
174+ * enables dynamic channel pooling for those instances, allowing the connection
175+ * pools to scale dynamically based on outstanding RPC load.
176+ *
171177 * The returned connection object should not be used directly; instead it
172178 * should be given to a `Table` instance, and methods should be invoked on
173179 * `Table`.
@@ -186,9 +192,27 @@ class DataConnection {
186192 * `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment and unexpected
187193 * options will be logged.
188194 *
195+ * @param instances The target instances to connect to. Specifying target
196+ * instances enables dynamic channel pooling and other connection-level
197+ * optimizations.
198+ * @param options (optional) Configure the `DataConnection` created by this
199+ * function.
200+ */
201+ std::shared_ptr<DataConnection> MakeDataConnection (
202+ std::vector<InstanceResource> instances, Options options = {});
203+
204+ /* *
205+ * Returns a `DataConnection` object that can be used for interacting with
206+ * the Cloud Bigtable Data API.
207+ *
208+ * @deprecated Use the MakeDataConnection overload that accepts a vector of
209+ * instances.
210+ *
189211 * @param options (optional) Configure the `DataConnection` created by this
190212 * function.
191213 */
214+ GOOGLE_CLOUD_CPP_DEPRECATED (
215+ " Use the MakeDataConnection overload that accepts a vector of instances." )
192216std::shared_ptr<DataConnection> MakeDataConnection (Options options = {});
193217
194218GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
0 commit comments