Package org.jgroups.util
Class TimeScheduler2.MyTask
java.lang.Object
org.jgroups.util.TimeScheduler2.MyTask
- Enclosing class:
TimeScheduler2
Simple task wrapper, always executed by at most 1 thread.
-
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
-
task
-
cancelled
protected volatile boolean cancelled -
done
protected volatile boolean done -
next
-
-
Constructor Details
-
MyTask
-
-
Method Details
-
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
-