protected static class CubaThreadPoolTaskScheduler.TaskDecorator<V>
extends java.lang.Object
implements java.util.concurrent.RunnableScheduledFuture<V>
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.RunnableScheduledFuture<V> |
delegate |
protected StatisticsAccumulator |
statisticsAccumulator |
Constructor and Description |
---|
TaskDecorator(java.util.concurrent.RunnableScheduledFuture<V> delegate,
StatisticsAccumulator statisticsAccumulator) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
protected void |
cleanContext() |
int |
compareTo(java.util.concurrent.Delayed o) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
long |
getDelay(java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isPeriodic() |
void |
run() |
protected java.util.concurrent.RunnableScheduledFuture<V> delegate
protected StatisticsAccumulator statisticsAccumulator
public TaskDecorator(java.util.concurrent.RunnableScheduledFuture<V> delegate, StatisticsAccumulator statisticsAccumulator)
public boolean isPeriodic()
isPeriodic
in interface java.util.concurrent.RunnableScheduledFuture<V>
public void run()
run
in interface java.lang.Runnable
run
in interface java.util.concurrent.RunnableFuture<V>
protected void cleanContext()
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<V>
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<V>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<V>
public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public V get(long timeout, @Nonnull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public long getDelay(@Nonnull java.util.concurrent.TimeUnit unit)
getDelay
in interface java.util.concurrent.Delayed
public int compareTo(@Nonnull java.util.concurrent.Delayed o)
compareTo
in interface java.lang.Comparable<java.util.concurrent.Delayed>