Skip to content

Commit

Permalink
chore: java doc update to for returned data instances (#165)
Browse files Browse the repository at this point in the history
* chore: java doc update to for returned data instances

To let the user know about Batcher instance returned from Bulk operations are not threadsafe.

* chore: addressing feedback comments

Added JavaDocs for `BigtableDataClient`.

* Adding comments for BigtableDataClient#readRows()
  • Loading branch information
rahulKQL committed Feb 24, 2020
1 parent 0485db2 commit 525886c
Showing 1 changed file with 11 additions and 4 deletions.
Expand Up @@ -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.
*
* <p>This client can be safely shared across multiple threads except for the Batcher instances
* returned from bulk operations, eg. `newBulkMutationBatcher()`, `newBulkReadRowsBatcher()`.
*
* <p>The surface of this class includes several types of Java methods for each of the API's
* methods:
*
Expand Down Expand Up @@ -651,7 +654,8 @@ public <RowT> UnaryCallable<Query, RowT> readRowCallable(RowAdapter<RowT> 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.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -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.
*
* <p>Sample Code:
*
Expand Down Expand Up @@ -1073,7 +1078,8 @@ public Batcher<RowMutationEntry, Void> 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.
*
* <p>Sample Code:
*
Expand Down Expand Up @@ -1107,7 +1113,8 @@ public Batcher<ByteString, Row> 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.
*
* <p>Sample Code:
*
Expand Down

0 comments on commit 525886c

Please sign in to comment.