@InternalExtensionOnly public class BulkMutation extends Object
MutateRowRequest
s into a single MutateRowsRequest
. This class is not thread safe, and requires calling classes to make it thread
safe.Modifier and Type | Field and Description |
---|---|
static long |
MAX_NUMBER_OF_MUTATIONS
For internal use only - public for technical reasons.
|
static long |
MAX_RPC_WAIT_TIME_NANOS
For internal use only - public for technical reasons.
|
Constructor and Description |
---|
BulkMutation(BigtableTableName tableName,
BigtableDataClient client,
ScheduledExecutorService retryExecutorService,
BulkOptions bulkOptions)
For internal use only - public for technical reasons.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.v2.MutateRowResponse> |
add(com.google.bigtable.v2.MutateRowRequest request) |
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.v2.MutateRowResponse> |
add(com.google.bigtable.v2.MutateRowsRequest.Entry entry)
Adds a
MutateRowsRequest.Entry to the MutateRowsRequest.Builder . |
void |
flush()
Send any outstanding
MutateRowRequest s and wait until all requests are complete. |
boolean |
isFlushed() |
void |
sendUnsent() |
@InternalApi(value="For internal usage only") public static final long MAX_RPC_WAIT_TIME_NANOS
@InternalApi(value="For internal usage only") public static final long MAX_NUMBER_OF_MUTATIONS
@InternalApi(value="For internal usage only") public BulkMutation(BigtableTableName tableName, BigtableDataClient client, ScheduledExecutorService retryExecutorService, BulkOptions bulkOptions)
public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.v2.MutateRowResponse> add(com.google.bigtable.v2.MutateRowRequest request)
public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.v2.MutateRowResponse> add(com.google.bigtable.v2.MutateRowsRequest.Entry entry)
MutateRowsRequest.Entry
to the MutateRowsRequest.Builder
.entry
- The MutateRowsRequest.Entry
to addSettableFuture
that will be populated when
the MutateRowsResponse
returns from the server. See BulkMutation.Batch.addCallback(ListenableFuture)
for more information about how the
SettableFuture is set.public void flush() throws InterruptedException
MutateRowRequest
s and wait until all requests are complete.InterruptedException
public void sendUnsent()
public boolean isFlushed()
MutateRowRequest
that still need to be sent.