Class MockBatchScanner

  extended by org.apache.accumulo.core.client.impl.ScannerOptions
      extended by org.apache.accumulo.core.client.mock.MockScannerBase
          extended by org.apache.accumulo.core.client.mock.MockBatchScanner
All Implemented Interfaces:
Iterable<Map.Entry<Key,Value>>, BatchScanner, ScannerBase
Direct Known Subclasses:

public class MockBatchScanner
extends MockScannerBase
implements BatchScanner

Field Summary
Fields inherited from class org.apache.accumulo.core.client.mock.MockScannerBase
auths, table
Fields inherited from class org.apache.accumulo.core.client.impl.ScannerOptions
fetchedColumns, serverSideIteratorList, serverSideIteratorOptions, timeOut
Constructor Summary
MockBatchScanner(MockTable mockTable, Authorizations authorizations)
Method Summary
 void close()
          Closes any underlying connections on the scanner
 Iterator<Map.Entry<Key,Value>> iterator()
          Returns an iterator over an accumulo table.
 void setRanges(Collection<Range> ranges)
          Allows scanning over multiple ranges efficiently.
Methods inherited from class org.apache.accumulo.core.client.mock.MockScannerBase
Methods inherited from class org.apache.accumulo.core.client.impl.ScannerOptions
addScanIterator, clearColumns, clearScanIterators, fetchColumn, fetchColumn, fetchColumnFamily, getFetchedColumns, getTimeout, removeScanIterator, setOptions, setTimeout, updateScanIteratorOption
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.accumulo.core.client.BatchScanner
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase
addScanIterator, clearColumns, clearScanIterators, fetchColumn, fetchColumnFamily, getTimeout, removeScanIterator, updateScanIteratorOption

Constructor Detail


public MockBatchScanner(MockTable mockTable,
                        Authorizations authorizations)
Method Detail


public void setRanges(Collection<Range> ranges)
Description copied from interface: BatchScanner
Allows scanning over multiple ranges efficiently.

Specified by:
setRanges in interface BatchScanner
ranges - specifies the non-overlapping ranges to query


public Iterator<Map.Entry<Key,Value>> iterator()
Description copied from interface: ScannerBase
Returns an iterator over an accumulo table. This iterator uses the options that are currently set for its lifetime, so setting options will have no effect on existing iterators. Keys returned by the iterator are not guaranteed to be in sorted order.

Specified by:
iterator in interface Iterable<Map.Entry<Key,Value>>
Specified by:
iterator in interface ScannerBase
iterator in class MockScannerBase
an iterator over Key,Value pairs which meet the restrictions set on the scanner


public void close()
Description copied from interface: ScannerBase
Closes any underlying connections on the scanner

Specified by:
close in interface BatchScanner
Specified by:
close in interface ScannerBase
close in class ScannerOptions

Copyright © 2013 Apache Accumulo Project. All Rights Reserved.