Package org.apache.accumulo.tserver.scan
Class ScanTask<T>
- java.lang.Object
-
- org.apache.accumulo.tserver.scan.ScanTask<T>
-
- All Implemented Interfaces:
Runnable,Future<T>,RunnableFuture<T>
- Direct Known Subclasses:
LookupTask,NextBatchTask
public abstract class ScanTask<T> extends Object implements RunnableFuture<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicBooleaninterruptFlagprotected ArrayBlockingQueue<Object>resultQueueprotected AtomicReference<ScanRunState>runStateprotected TabletServerserverprotected AtomicIntegerstate
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddResult(Object o)booleancancel(boolean mayInterruptIfRunning)Tget()Tget(long timeout, TimeUnit unit)ScanRunStategetScanRunState()booleanisCancelled()booleanisDone()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.RunnableFuture
run
-
-
-
-
Field Detail
-
server
protected final TabletServer server
-
interruptFlag
protected AtomicBoolean interruptFlag
-
resultQueue
protected ArrayBlockingQueue<Object> resultQueue
-
state
protected AtomicInteger state
-
runState
protected AtomicReference<ScanRunState> runState
-
-
Method Detail
-
addResult
protected void addResult(Object o)
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
get
public T get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<T>
-
getScanRunState
public ScanRunState getScanRunState()
-
-