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 enum
Summarized status of a single task. -
Method Summary
-
Method Details
-
getTaskId
public int getTaskId() -
getState
-
getStartTime
-
getQueueName
-
cancel
@CanIgnoreReturnValue public boolean cancel(boolean mayInterruptIfRunning) -
compareTo
- Specified by:
compareTo
in interfaceComparable<V>
-
get
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
getDelay
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<V>
-
isDone
public boolean isDone() -
isPeriodic
public boolean isPeriodic()- Specified by:
isPeriodic
in interfaceRunnableScheduledFuture<V>
-
run
public void run()- Specified by:
run
in interfaceRunnable
- Specified by:
run
in interfaceRunnableFuture<V>
-
toString
-