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

java.lang.Object
  extended by org.apache.accumulo.core.client.impl.ScannerOptions
      extended by org.apache.accumulo.core.client.impl.ScannerImpl
All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<Key,Value>>, Scanner, ScannerBase

public class ScannerImpl
extends ScannerOptions
implements Scanner


Constructor Summary
ScannerImpl(Instance instance, AuthInfo credentials, java.lang.String table, Authorizations authorizations)
           
 
Method Summary
 void disableIsolation()
           
 void enableIsolation()
           
 int getBatchSize()
           
 Range getRange()
           
 int getTimeOut()
           
 java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
          Returns an iterator over a accumulo table.
 void setBatchSize(int size)
           
 void setRange(Range range)
           
 void setTimeOut(int timeOut)
          When failure occurs, the scanner automatically retries.
 
Methods inherited from class org.apache.accumulo.core.client.impl.ScannerOptions
clearColumns, clearScanIterators, fetchColumn, fetchColumn, fetchColumnFamily, getFetchedColumns, setColumnFamilyRegex, setColumnQualifierRegex, setOptions, setRowRegex, setScanIteratorOption, setScanIterators, setupRegex, setValueRegex
 
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.ScannerBase
clearColumns, clearScanIterators, fetchColumn, fetchColumnFamily, setColumnFamilyRegex, setColumnQualifierRegex, setRowRegex, setScanIteratorOption, setScanIterators, setupRegex, setValueRegex
 

Constructor Detail

ScannerImpl

public ScannerImpl(Instance instance,
                   AuthInfo credentials,
                   java.lang.String table,
                   Authorizations authorizations)
Method Detail

setTimeOut

public void setTimeOut(int timeOut)
When failure occurs, the scanner automatically retries. This setting determines how long a scanner will retry. By default a scanner will retry forever.

Specified by:
setTimeOut in interface Scanner
Parameters:
timeOut - in milliseconds

getTimeOut

public int getTimeOut()
Specified by:
getTimeOut in interface Scanner
Returns:
the timeout configured for this scanner

setRange

public void setRange(Range range)
Specified by:
setRange in interface Scanner
Parameters:
range - key range to begin and end scan

getRange

public Range getRange()
Specified by:
getRange in interface Scanner
Returns:
the range configured for this scanner

setBatchSize

public void setBatchSize(int size)
Specified by:
setBatchSize in interface Scanner
Parameters:
size - the number of Keys/Value pairs to fetch per call to Accumulo

getBatchSize

public int getBatchSize()
Specified by:
getBatchSize in interface Scanner
Returns:
the batch size configured for this scanner

iterator

public java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
Returns an iterator over a accumulo table. This iterator uses the options that are currently set on the scanner for its lifetime. So setting options on a Scanner object will have no effect on existing iterators.

Specified by:
iterator in interface java.lang.Iterable<java.util.Map.Entry<Key,Value>>
Specified by:
iterator in interface Scanner

enableIsolation

public void enableIsolation()
Specified by:
enableIsolation in interface Scanner

disableIsolation

public void disableIsolation()
Specified by:
disableIsolation in interface Scanner


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