@InternalApi(value="For internal usage only - please use BulkMutation") public class BulkMutationWrapper extends Object implements IBulkMutation
BulkMutation
with Google-cloud-java's model.
For internal use only - public for technical reasons.
See BigtableSession.createBulkMutation(BigtableTableName)
as a public
alternative.
Constructor and Description |
---|
BulkMutationWrapper(BulkMutation bulkMutation) |
Modifier and Type | Method and Description |
---|---|
com.google.api.core.ApiFuture<Void> |
add(com.google.cloud.bigtable.data.v2.models.RowMutationEntry rowMutation)
Adds a
RowMutationEntry to the underlying IBulkMutation mechanism. |
void |
close()
Closes this bulk Mutation and prevents from mutating any more elements
|
void |
flush()
Sends any outstanding RowMutationEntry and blocks until all requests are complete.
|
void |
sendUnsent()
Sends any outstanding entry, present in the current batch but doesn't wait for response.
|
public BulkMutationWrapper(BulkMutation bulkMutation)
public com.google.api.core.ApiFuture<Void> add(com.google.cloud.bigtable.data.v2.models.RowMutationEntry rowMutation)
RowMutationEntry
to the underlying IBulkMutation mechanism.add
in interface IBulkMutation
rowMutation
- The RowMutationEntry which holds row mutation details.ApiFuture
of type Void
will be set when request is successful
otherwise exception will be thrown.public void sendUnsent()
sendUnsent
in interface IBulkMutation
public void flush() throws InterruptedException
flush
in interface IBulkMutation
InterruptedException
public void close() throws IOException
IBulkMutation
close
in interface IBulkMutation
close
in interface AutoCloseable
IOException