/** * Send any outstanding {@link MutateRowRequest}s and wait until all requests are complete. */ public void flush() throws InterruptedException { sendUnsent(); operationAccountant.awaitCompletion(); }
/** * Waits until all operations managed by the * {@link com.google.cloud.bigtable.grpc.async.OperationAccountant} complete. See * {@link com.google.cloud.bigtable.grpc.async.OperationAccountant#awaitCompletion()} for more * information. * @throws java.io.IOException if something goes wrong. */ public void flush() throws IOException { LOG.trace("Flushing"); try { operationsAccountant.awaitCompletion(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IOException("Batch operations were interrupted."); } LOG.trace("Done flushing"); }