public class ThreadScopeRunnableScheduledFuture<V> extends Object implements RunnableScheduledFuture<V>
| Modifier and Type | Field and Description |
|---|---|
protected RunnableScheduledFuture<V> |
delegate |
protected ThreadScopeManager |
threadScopeManager |
protected ThreadScopeState |
threadScopeState |
| Constructor and Description |
|---|
ThreadScopeRunnableScheduledFuture(ThreadScopeManager threadScopeManager,
RunnableScheduledFuture<V> delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterRun()
Overload this and
beforeRun() to add custom bindings. |
protected void |
beforeRun() |
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(Delayed o) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isPeriodic() |
void |
run() |
protected final ThreadScopeManager threadScopeManager
protected final RunnableScheduledFuture<V> delegate
protected final ThreadScopeState threadScopeState
public ThreadScopeRunnableScheduledFuture(ThreadScopeManager threadScopeManager, RunnableScheduledFuture<V> delegate)
public boolean isPeriodic()
isPeriodic in interface RunnableScheduledFuture<V>public int compareTo(Delayed o)
compareTo in interface Comparable<Delayed>public void run()
run in interface Runnablerun in interface RunnableFuture<V>protected void afterRun()
beforeRun() to add custom bindings. Binding MDC values in logback is an example.protected void beforeRun()
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2015 devbury. All rights reserved.