org.springframework.scheduling.commonj
Class TimerManagerTaskScheduler.TimerScheduledFuture
java.lang.Object
java.util.concurrent.FutureTask<java.lang.Object>
org.springframework.scheduling.commonj.TimerManagerTaskScheduler.TimerScheduledFuture
- All Implemented Interfaces:
- java.lang.Comparable<java.util.concurrent.Delayed>, java.lang.Runnable, java.util.concurrent.Delayed, java.util.concurrent.Future<java.lang.Object>, java.util.concurrent.RunnableFuture<java.lang.Object>, java.util.concurrent.ScheduledFuture<java.lang.Object>
- Direct Known Subclasses:
- TimerManagerTaskScheduler.ReschedulingTimerListener
- Enclosing class:
- TimerManagerTaskScheduler
private static class TimerManagerTaskScheduler.TimerScheduledFuture
- extends java.util.concurrent.FutureTask<java.lang.Object>
- implements java.util.concurrent.ScheduledFuture<java.lang.Object>
ScheduledFuture adapter that wraps a CommonJ Timer.
Method Summary |
boolean |
cancel(boolean mayInterruptIfRunning)
|
int |
compareTo(java.util.concurrent.Delayed other)
|
long |
getDelay(java.util.concurrent.TimeUnit unit)
|
void |
setTimer(Timer timer)
|
void |
timerExpired(Timer timer)
|
Methods inherited from class java.util.concurrent.FutureTask |
done, get, get, isCancelled, isDone, run, runAndReset, set, setException |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.concurrent.Future |
get, get, isCancelled, isDone |
timer
protected transient Timer timer
cancelled
protected transient boolean cancelled
TimerManagerTaskScheduler.TimerScheduledFuture
public TimerManagerTaskScheduler.TimerScheduledFuture(java.lang.Runnable runnable)
setTimer
public void setTimer(Timer timer)
timerExpired
public void timerExpired(Timer timer)
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interface java.util.concurrent.Future<java.lang.Object>
- Overrides:
cancel
in class java.util.concurrent.FutureTask<java.lang.Object>
getDelay
public long getDelay(java.util.concurrent.TimeUnit unit)
- Specified by:
getDelay
in interface java.util.concurrent.Delayed
compareTo
public int compareTo(java.util.concurrent.Delayed other)
- Specified by:
compareTo
in interface java.lang.Comparable<java.util.concurrent.Delayed>