|
69 | 69 | * an application. However, close() needs to be called on the client object to clean up resources |
70 | 70 | * such as threads during application shutdown. |
71 | 71 | * |
| 72 | + * <p>This client can be safely shared across multiple threads except for the Batcher instances |
| 73 | + * returned from bulk operations, eg. `newBulkMutationBatcher()`, `newBulkReadRowsBatcher()`. |
| 74 | + * |
72 | 75 | * <p>The surface of this class includes several types of Java methods for each of the API's |
73 | 76 | * methods: |
74 | 77 | * |
@@ -651,7 +654,8 @@ public <RowT> UnaryCallable<Query, RowT> readRowCallable(RowAdapter<RowT> rowAda |
651 | 654 | } |
652 | 655 |
|
653 | 656 | /** |
654 | | - * Convenience method for synchronously streaming the results of a {@link Query}. |
| 657 | + * Convenience method for synchronously streaming the results of a {@link Query}. The returned |
| 658 | + * ServerStream instance is not threadsafe, it can only be used from single thread. |
655 | 659 | * |
656 | 660 | * <p>Sample code: |
657 | 661 | * |
@@ -1045,7 +1049,8 @@ public void bulkMutateRows(BulkMutation mutation) { |
1045 | 1049 |
|
1046 | 1050 | /** |
1047 | 1051 | * Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, |
1048 | | - * but the entire batch is not executed atomically. |
| 1052 | + * but the entire batch is not executed atomically. The returned Batcher instance is not |
| 1053 | + * threadsafe, it can only be used from single thread. |
1049 | 1054 | * |
1050 | 1055 | * <p>Sample Code: |
1051 | 1056 | * |
@@ -1073,7 +1078,8 @@ public Batcher<RowMutationEntry, Void> newBulkMutationBatcher(@Nonnull String ta |
1073 | 1078 |
|
1074 | 1079 | /** |
1075 | 1080 | * Reads rows for given tableId in a batch. If the row does not exist, the value will be null. |
1076 | | - * This operation should be called with in a single thread. |
| 1081 | + * This operation should be called with in a single thread. The returned Batcher instance is not |
| 1082 | + * threadsafe, it can only be used from single thread. |
1077 | 1083 | * |
1078 | 1084 | * <p>Sample Code: |
1079 | 1085 | * |
@@ -1107,7 +1113,8 @@ public Batcher<ByteString, Row> newBulkReadRowsBatcher(String tableId) { |
1107 | 1113 |
|
1108 | 1114 | /** |
1109 | 1115 | * Reads rows for given tableId and filter criteria in a batch. If the row does not exist, the |
1110 | | - * value will be null. This operation should be called with in a single thread. |
| 1116 | + * value will be null. This operation should be called with in a single thread. The returned |
| 1117 | + * Batcher instance is not threadsafe, it can only be used from single thread. |
1111 | 1118 | * |
1112 | 1119 | * <p>Sample Code: |
1113 | 1120 | * |
|
0 commit comments