Package org.jgroups.util
Class TimeScheduler3.Task
java.lang.Object
org.jgroups.util.TimeScheduler3.Task
- All Implemented Interfaces:
Comparable<Delayed>,Runnable,Delayed,Future
- Direct Known Subclasses:
TimeScheduler3.RecurringTask
- Enclosing class:
TimeScheduler3
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Field Summary
Fields -
Constructor Summary
Constructors -
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
-
Field Details
-
runnable
-
creation_time
protected long creation_time -
delay
protected long delay -
cancelled
protected volatile boolean cancelled -
done
protected volatile boolean done -
can_block
protected final boolean can_block
-
-
Constructor Details
-
Task
-
Task
-
-
Method Details
-
getRunnable
-
canBlock
public boolean canBlock() -
compareTo
- Specified by:
compareToin interfaceComparable<Delayed>
-
getDelay
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture
-
isDone
public boolean isDone() -
get
- Specified by:
getin interfaceFuture- Throws:
InterruptedExceptionExecutionException
-
get
public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
run
public void run() -
toString
-