org.apache.accumulo.core.client.impl
Class MultiTableBatchWriterImpl

java.lang.Object
  extended by org.apache.accumulo.core.client.impl.MultiTableBatchWriterImpl
All Implemented Interfaces:
MultiTableBatchWriter

public class MultiTableBatchWriterImpl
extends Object
implements MultiTableBatchWriter


Constructor Summary
MultiTableBatchWriterImpl(Instance instance, AuthInfo credentials, long maxMemory, long maxLatency, int maxWriteThreads)
           
 
Method Summary
 void close()
          Flush and release all resources.
 void flush()
          Send mutations for all tables to accumulo.
 BatchWriter getBatchWriter(String tableName)
          Returns a BatchWriter for a particular table.
 boolean isClosed()
          Returns true if this batch writer has been closed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTableBatchWriterImpl

public MultiTableBatchWriterImpl(Instance instance,
                                 AuthInfo credentials,
                                 long maxMemory,
                                 long maxLatency,
                                 int maxWriteThreads)
Method Detail

isClosed

public boolean isClosed()
Description copied from interface: MultiTableBatchWriter
Returns true if this batch writer has been closed.

Specified by:
isClosed in interface MultiTableBatchWriter
Returns:
true if this batch writer has been closed

close

public void close()
           throws MutationsRejectedException
Description copied from interface: MultiTableBatchWriter
Flush and release all resources.

Specified by:
close in interface MultiTableBatchWriter
Throws:
MutationsRejectedException - when queued mutations are unable to be inserted

getBatchWriter

public BatchWriter getBatchWriter(String tableName)
                           throws AccumuloException,
                                  AccumuloSecurityException,
                                  TableNotFoundException
Description copied from interface: MultiTableBatchWriter
Returns a BatchWriter for a particular table.

Specified by:
getBatchWriter in interface MultiTableBatchWriter
Parameters:
tableName - the name of a table whose batch writer you wish to retrieve
Returns:
an instance of a batch writer for the specified table
Throws:
AccumuloException - when a general exception occurs with accumulo
AccumuloSecurityException - when the user is not allowed to insert data into that table
TableNotFoundException - when the table does not exist

flush

public void flush()
           throws MutationsRejectedException
Description copied from interface: MultiTableBatchWriter
Send mutations for all tables to accumulo.

Specified by:
flush in interface MultiTableBatchWriter
Throws:
MutationsRejectedException - when queued mutations are unable to be inserted


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.