org.cip4.jdflib.util.thread
Class TimeSweeper
java.lang.Object
org.cip4.jdflib.util.thread.TimeSweeper
- All Implemented Interfaces:
- Sweeper
public abstract class TimeSweeper
- extends Object
- implements Sweeper
class that sweeps at a regular interval - useful in case multiple sweepers with differing timing requirements are run
- Author:
- rainer prosi
|
Field Summary |
protected org.apache.commons.logging.Log |
log
|
protected long |
t0
|
|
Constructor Summary |
protected |
TimeSweeper(int interval)
|
log
protected org.apache.commons.logging.Log log
t0
protected long t0
TimeSweeper
protected TimeSweeper(int interval)
- Parameters:
interval - the time interval in seconds
setInterval
protected void setInterval(int interval)
needSweep
public boolean needSweep()
- if true we want to sweep
- Specified by:
needSweep in interface Sweeper
- Returns:
- See Also:
Sweeper.needSweep()
sweep
public boolean sweep()
- default is nop
- Specified by:
sweep in interface Sweeper
- Returns:
- true if all went well
- See Also:
Sweeper.sweep()
toString
public String toString()
- Overrides:
toString in class Object
- See Also:
Object.toString()
Copyright © 2013. All Rights Reserved.