Package com.google.gerrit.server.git
Class WorkQueue.Task<V>
java.lang.Object
com.google.gerrit.server.git.WorkQueue.Task<V>
- All Implemented Interfaces:
Comparable<Delayed>,Runnable,Delayed,Future<V>,RunnableFuture<V>,RunnableScheduledFuture<V>,ScheduledFuture<V>
- Direct Known Subclasses:
WorkQueue.ProjectTask
- Enclosing class:
WorkQueue
A wrapper around a scheduled Runnable, as maintained in the queue.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSummarized status of a single task. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Method Details
-
getTaskId
public int getTaskId() -
getState
-
getStartTime
-
getQueueName
-
cancel
@CanIgnoreReturnValue public boolean cancel(boolean mayInterruptIfRunning) -
compareTo
- Specified by:
compareToin interfaceComparable<V>
-
get
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
getDelay
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<V>
-
isDone
public boolean isDone() -
isPeriodic
public boolean isPeriodic()- Specified by:
isPeriodicin interfaceRunnableScheduledFuture<V>
-
run
public void run()- Specified by:
runin interfaceRunnable- Specified by:
runin interfaceRunnableFuture<V>
-
toString
-