diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index 40d9f70cac..e249684244 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -69,6 +69,9 @@ * an application. However, close() needs to be called on the client object to clean up resources * such as threads during application shutdown. * + *

This client can be safely shared across multiple threads except for the Batcher instances + * returned from bulk operations, eg. `newBulkMutationBatcher()`, `newBulkReadRowsBatcher()`. + * *

The surface of this class includes several types of Java methods for each of the API's * methods: * @@ -651,7 +654,8 @@ public UnaryCallable readRowCallable(RowAdapter rowAda } /** - * Convenience method for synchronously streaming the results of a {@link Query}. + * Convenience method for synchronously streaming the results of a {@link Query}. The returned + * ServerStream instance is not threadsafe, it can only be used from single thread. * *

Sample code: * @@ -1045,7 +1049,8 @@ public void bulkMutateRows(BulkMutation mutation) { /** * Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, - * but the entire batch is not executed atomically. + * but the entire batch is not executed atomically. The returned Batcher instance is not + * threadsafe, it can only be used from single thread. * *

Sample Code: * @@ -1073,7 +1078,8 @@ public Batcher newBulkMutationBatcher(@Nonnull String ta /** * Reads rows for given tableId in a batch. If the row does not exist, the value will be null. - * This operation should be called with in a single thread. + * This operation should be called with in a single thread. The returned Batcher instance is not + * threadsafe, it can only be used from single thread. * *

Sample Code: * @@ -1107,7 +1113,8 @@ public Batcher newBulkReadRowsBatcher(String tableId) { /** * Reads rows for given tableId and filter criteria in a batch. If the row does not exist, the - * value will be null. This operation should be called with in a single thread. + * value will be null. This operation should be called with in a single thread. The returned + * Batcher instance is not threadsafe, it can only be used from single thread. * *

Sample Code: *