info.magnolia.cms.util
Class DelayedExecutor
java.lang.Object
info.magnolia.cms.util.DelayedExecutor
public class DelayedExecutor
- extends java.lang.Object
There are many places where we like to delay an execution (in case of a serie of fired events). But we want to ensure
the the task is executed after a certain maximum delay.
- Version:
- $Id: DelayedExecutor.java 41137 2011-01-06 18:19:25Z gjoseph $
- Author:
- philipp
Field Summary |
protected java.lang.Runnable |
command
|
protected long |
delay
|
protected long |
maxDelay
|
protected java.lang.Object |
taskId
The current taskId. |
protected EDU.oswego.cs.dl.util.concurrent.ClockDaemon |
timer
|
protected long |
timestamp
|
Constructor Summary |
DelayedExecutor(java.lang.Runnable command,
long delay,
long maxDelay)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timer
protected EDU.oswego.cs.dl.util.concurrent.ClockDaemon timer
delay
protected long delay
maxDelay
protected long maxDelay
timestamp
protected long timestamp
command
protected java.lang.Runnable command
taskId
protected java.lang.Object taskId
- The current taskId.
DelayedExecutor
public DelayedExecutor(java.lang.Runnable command,
long delay,
long maxDelay)
- Parameters:
delay
- millisecondsmaxDelay
- milliseconds
trigger
public void trigger()
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.