org.knopflerfish.util.workerthread
public abstract class RepeatingJob extends Job
| Constructor and Description |
|---|
RepeatingJob(int[] delays,
int repeatPolicy)
Creates a repetetive event.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getRepeatNo()
Returns the number of successful repeats this job has made.
|
void |
quit()
This method can be called to stop repeating this Job.
|
public RepeatingJob(int[] delays,
int repeatPolicy)
run has been called the first
time, it will add itself after a delay indicated by
delays[0]. Subsequent runs will occur as indicated by the
array delays. All delays are in milliseconds.delays - The delays (in milliseconds) to make between the calls to this
RepeatingJobs run() method.repeatPolicy - Indicates what to do when this RepeatingJob has been called as
many times as the delays parameter specifies by
its length. A positive value will keep on calling the
run() method indefinitely, each time using
repeatPolicy milliseconds as the delay. A
negative value or zero, will cause this event not to be
repeated any more.public void quit()
public int getRepeatNo()