public ApiFuture < Void > add ( final RowMutation rowMutation ) { Preconditions . checkState ( ! closed , "BulkMutations has been closed" ) ; numOutstanding . incrementAndGet ( ) ; ApiFuture < Void > future = callable . futureCall ( rowMutation ) ; ApiFutures . addCallback ( future , new ApiFutureCallback < Void > ( ) { @ Override public void onFailure ( Throwable throwable ) { onMutationComplete ( false ) ; } @ Override public void onSuccess ( Void aVoid ) { onMutationComplete ( true ) ; } } , MoreExecutors . directExecutor ( ) ) ; return future ; }
Queues the mutation to be batched and sent . Please note that the order of mutations is not guaranteed .