@BetaApi(value="This surface is likely to change as the batching surface evolves.") public final class BulkMutationBatcher extends Object implements AutoCloseable
for example
usage.| Modifier and Type | Class and Description |
|---|---|
static class |
BulkMutationBatcher.BulkMutationFailure
Thrown when at least one mutation failed in a batch.
|
| Constructor and Description |
|---|
BulkMutationBatcher(com.google.api.gax.rpc.UnaryCallable<RowMutation,Void> callable) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.core.ApiFuture<Void> |
add(RowMutation rowMutation)
Queues the mutation to be batched and sent.
|
void |
close()
Waits up to 10 minutes for all of the outstanding mutations to be resolved.
|
void |
close(org.threeten.bp.Duration duration)
Prevents further mutations and waits for all outstanding mutations to complete.
|
@InternalApi public BulkMutationBatcher(com.google.api.gax.rpc.UnaryCallable<RowMutation,Void> callable)
public void close()
throws InterruptedException,
TimeoutException
close in interface AutoCloseableInterruptedExceptionTimeoutExceptionfor more infortmation.public void close(org.threeten.bp.Duration duration)
throws InterruptedException,
TimeoutException
BulkMutationBatcher.BulkMutationFailure - If any mutations failed.InterruptedException - If interrupted.TimeoutException - If the outstanding requests don't finish in time.public com.google.api.core.ApiFuture<Void> add(RowMutation rowMutation)
IllegalStateException - If this instance has been closed.Copyright © 2019 Google LLC. All rights reserved.