Package com.sun.identity.common
Interface TaskRunnable
- 
- All Superinterfaces:
 Runnable
- All Known Implementing Classes:
 CacheCleanUpRunnable,ClusterStateService,FSRequestCleanUpRunnable,GeneralTaskRunnable,HeadTaskRunnable,InstantGroupRunnable,InstantRunnable,KeyStoreRefresher,PeriodicCleanUpMap,PeriodicGroupMap,PeriodicGroupRunnable,PeriodicRunnable,POSTCleanUpRunnable,SessionCuller,StatsRunner,TokenCleanupRunnable,WebtopNaming.SiteMonitor
public interface TaskRunnable extends Runnable
TaskRunnable is the basic scheduleable unit which defines the necessary functions for TimerPool and RunnableTimerTask. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddElement(Object key)Adds an element to this TaskRunnable.voidcancel()Cancel the task from scheduled Timer.HeadTaskRunnablegetHeadTask()Returns the head task for this linkable TaskRunnable.longgetRunPeriod()Returns the run period of this TaskRunnable.booleanisEmpty()Indicates whether this TaskRunnable is empty.TaskRunnablenext()Returns the TaskRunnable next to this TaskRunnable in the linked-list.TaskRunnableprevious()Returns the TaskRunnable previous to this TaskRunnable in the linked-list.booleanremoveElement(Object key)Removes an element from this TaskRunnable.longscheduledExecutionTime()Returns the scheduled time of this TaskRunnable.voidsetHeadTask(HeadTaskRunnable headTask)Sets the head task for this linkable TaskRunnable.voidsetNext(TaskRunnable task)Sets the TaskRunnable next to this TaskRunnable in the linked-list.voidsetPrevious(TaskRunnable task)Sets the TaskRunnable previous to this TaskRunnable in the linked-list. 
 - 
 
- 
- 
Method Detail
- 
addElement
boolean addElement(Object key)
Adds an element to this TaskRunnable.- Parameters:
 key- Element to be added to this TaskRunnable- Returns:
 - a boolean to indicate whether the add success
 
 
- 
removeElement
boolean removeElement(Object key)
Removes an element from this TaskRunnable.- Parameters:
 key- Element to be removed from this TaskRunnable- Returns:
 - A boolean to indicate whether the remove success
 
 
- 
isEmpty
boolean isEmpty()
Indicates whether this TaskRunnable is empty.- Returns:
 - A boolean to indicate whether this TaskRunnable is empty
 
 
- 
setNext
void setNext(TaskRunnable task)
Sets the TaskRunnable next to this TaskRunnable in the linked-list. It is for internal use only.- Parameters:
 task- The next TaskRunnable
 
- 
setPrevious
void setPrevious(TaskRunnable task)
Sets the TaskRunnable previous to this TaskRunnable in the linked-list. It is for internal use only.- Parameters:
 task- The previous TaskRunnable
 
- 
setHeadTask
void setHeadTask(HeadTaskRunnable headTask)
Sets the head task for this linkable TaskRunnable. The head task of this TaskRunnable will be set. HeadTask works as a lock when the elements of the linked task is going to be changed. It is for internal use only.- Parameters:
 headTask- The HeadTaskRunnable
 
- 
getHeadTask
HeadTaskRunnable getHeadTask()
Returns the head task for this linkable TaskRunnable. The head task of this TaskRunnable will be returned or null if it doesn't have one. HeadTask works as a lock when the elements of the linked task is going to be changed.- Returns:
 - The head task of this linkable TaskRunnable
 
 
- 
getRunPeriod
long getRunPeriod()
Returns the run period of this TaskRunnable.- Returns:
 - A long value to indicate the run period
 
 
- 
next
TaskRunnable next()
Returns the TaskRunnable next to this TaskRunnable in the linked-list.- Returns:
 - next TaskRunnable object or null if it is not set
 
 
- 
previous
TaskRunnable previous()
Returns the TaskRunnable previous to this TaskRunnable in the linked-list.- Returns:
 - previous TaskRunnable object or null if it is not set
 
 
- 
scheduledExecutionTime
long scheduledExecutionTime()
Returns the scheduled time of this TaskRunnable.- Returns:
 - A long value indicate the time this TaskRunnable is scheduled, or -1 if it is not scheduled yet
 
 
- 
cancel
void cancel()
Cancel the task from scheduled Timer. 
 - 
 
 -