org.apache.accumulo.core.client.mock
Class MockMultiTableBatchWriter

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

public class MockMultiTableBatchWriter
extends Object
implements MultiTableBatchWriter


Constructor Summary
MockMultiTableBatchWriter(MockAccumulo acu)
           
 
Method Summary
 void close()
          Flush and release all resources.
 void flush()
          Send mutations for all tables to accumulo.
 BatchWriter getBatchWriter(String table)
          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

MockMultiTableBatchWriter

public MockMultiTableBatchWriter(MockAccumulo acu)
Method Detail

getBatchWriter

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

Specified by:
getBatchWriter in interface MultiTableBatchWriter
Parameters:
table - 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

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

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


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