Package org.jmock.lib.concurrent
Class DeterministicScheduler.ScheduledTask<T>
java.lang.Object
org.jmock.lib.concurrent.DeterministicScheduler.ScheduledTask<T>
- All Implemented Interfaces:
Comparable<Delayed>,Runnable,Delayed,Future<T>,ScheduledFuture<T>
- Enclosing class:
DeterministicScheduler
private final class DeterministicScheduler.ScheduledTask<T>
extends Object
implements ScheduledFuture<T>, Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScheduledTask(long repeatDelay, Runnable command) ScheduledTask(Runnable command) ScheduledTask(Callable<T> command) -
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
-
repeatDelay
public final long repeatDelay -
command
-
isCancelled
private boolean isCancelled -
isDone
private boolean isDone -
futureResult
-
failure
-
-
Constructor Details
-
ScheduledTask
-
ScheduledTask
-
ScheduledTask
-
-
Method Details
-
toString
-
repeats
public boolean repeats() -
getDelay
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
get
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone() -
run
public void run()
-