public class PeriodicRunnable extends GeneralTaskRunnable
Modifier and Type | Field and Description |
---|---|
protected int |
containerNeeded |
protected Set[] |
nextTurn |
protected boolean |
removeElementAfterAction |
protected long |
runPeriod |
protected Set |
thisTurn |
protected long |
timeoutPeriod |
headTask, nextTask, previousTask
Constructor and Description |
---|
PeriodicRunnable(long runPeriod,
long timeoutPeriod,
boolean removeElementAfterAction)
Constructor of PeriodicRunnable.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addElement(Object obj)
Adds an element to this PeriodicRunnable.
|
long |
getRunPeriod()
Returns the run period of this PeriodicRunnable.
|
long |
getTimeoutPeriod()
Returns the timeout period of this PeriodicRunnable.
|
boolean |
isEmpty()
Indicates whether this PeriodicRunnable is empty.
|
boolean |
removeElement(Object obj)
Removes an element from this PeriodicRunnable.
|
void |
run()
Implements for TaskRunnable.
|
cancel, getHeadTask, isScheduled, next, previous, scheduledExecutionTime, setHeadTask, setNext, setPrevious
protected Set thisTurn
protected Set[] nextTurn
protected long runPeriod
protected long timeoutPeriod
protected int containerNeeded
protected boolean removeElementAfterAction
public PeriodicRunnable(long runPeriod, long timeoutPeriod, boolean removeElementAfterAction) throws IllegalArgumentException
runPeriod
- The period of running this PeriodicRunnabletimeoutPeriod
- The timeout period of the objects in this
PeriodicRunnableremoveElementAfterAction
- Whether to remove the elements after
running the ScheduleableAction on the objectsIllegalArgumentException
public boolean addElement(Object obj)
obj
- Element to be added to this PeriodicRunnablepublic boolean removeElement(Object obj)
obj
- Element to be removed from this PeriodicRunnablepublic long getTimeoutPeriod()
public boolean isEmpty()
public long getRunPeriod()
public void run()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.