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 AtomicBoolean
interruptFlag
protected ArrayBlockingQueue<Object>
resultQueue
protected AtomicReference<ScanRunState>
runState
protected TabletServer
server
protected AtomicInteger
state
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addResult(Object o)
boolean
cancel(boolean mayInterruptIfRunning)
T
get()
T
get(long timeout, TimeUnit unit)
ScanRunState
getScanRunState()
boolean
isCancelled()
boolean
isDone()
-
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:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<T>
-
getScanRunState
public ScanRunState getScanRunState()
-
-