@Override public synchronized void enableIsolation() { ensureOpen(); this.isolated = true; }
@Override public synchronized long getReadaheadThreshold() { ensureOpen(); return readaheadThreshold; }
@Override public synchronized Range getRange() { ensureOpen(); return range; }
@Override public synchronized void disableIsolation() { ensureOpen(); this.isolated = false; }
@Override public synchronized int getBatchSize() { ensureOpen(); return size; }
@Override public Authorizations getAuthorizations() { ensureOpen(); return authorizations; }
@Override public synchronized void setReadaheadThreshold(long batches) { ensureOpen(); if (batches < 0) { throw new IllegalArgumentException( "Number of batches before read-ahead must be non-negative"); } readaheadThreshold = batches; }
@Override public synchronized void setBatchSize(int size) { ensureOpen(); if (size > 0) this.size = size; else throw new IllegalArgumentException("size must be greater than zero"); }
@Override public synchronized void setRange(Range range) { ensureOpen(); checkArgument(range != null, "range is null"); this.range = range; }
@Override public synchronized Iterator<Entry<Key,Value>> iterator() { ensureOpen(); ScannerIterator iter = new ScannerIterator(context, tableId, authorizations, range, size, getTimeout(TimeUnit.SECONDS), this, isolated, readaheadThreshold, new Reporter()); iters.put(iter, iterCount++); return iter; }