Package com.sun.identity.common
Class InstantGroupRunnable
- java.lang.Object
-
- com.sun.identity.common.GeneralTaskRunnable
-
- com.sun.identity.common.InstantRunnable
-
- com.sun.identity.common.InstantGroupRunnable
-
- All Implemented Interfaces:
ScheduleableGroupAction,TaskRunnable,Runnable
- Direct Known Subclasses:
StatsRunner
public class InstantGroupRunnable extends InstantRunnable implements ScheduleableGroupAction
Instant task (task will only be run once) which has handler separated (share the same ScheduleableGroupAction) can be scheduled to Timer or TimerPool by using InstantGroupRunnable. All the elements in the same InstantGroupRunnable must have the same scheduled time.
-
-
Field Summary
Fields Modifier and Type Field Description protected ScheduleableGroupActiontarget-
Fields inherited from class com.sun.identity.common.InstantRunnable
actions, allowToChange, removeElementAfterAction
-
Fields inherited from class com.sun.identity.common.GeneralTaskRunnable
headTask, nextTask, previousTask
-
-
Constructor Summary
Constructors Constructor Description InstantGroupRunnable(ScheduleableGroupAction target, boolean removeElementAfterAction)Constructor of InstantGroupRunnable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoGroupAction(Object obj)The function to be run on the objects when there is time.voidrun()Implements for TaskRunnable.-
Methods inherited from class com.sun.identity.common.InstantRunnable
addElement, getRunPeriod, isEmpty, removeElement, reset
-
Methods inherited from class com.sun.identity.common.GeneralTaskRunnable
cancel, getHeadTask, isScheduled, next, previous, scheduledExecutionTime, setHeadTask, setNext, setPrevious
-
-
-
-
Field Detail
-
target
protected ScheduleableGroupAction target
-
-
Constructor Detail
-
InstantGroupRunnable
public InstantGroupRunnable(ScheduleableGroupAction target, boolean removeElementAfterAction)
Constructor of InstantGroupRunnable.- Parameters:
target- The ScheduleableGroupAction interface to be run on the objects when there is timeremoveElementAfterAction- Whether to remove the elements after running the ScheduleableGroupAction on the objects
-
-
Method Detail
-
run
public void run()
Implements for TaskRunnable. Run the function of ScheduleableGroupAction on all the objects 1 by 1.- Specified by:
runin interfaceRunnable- Overrides:
runin classInstantRunnable
-
doGroupAction
public void doGroupAction(Object obj)
The function to be run on the objects when there is time.- Specified by:
doGroupActionin interfaceScheduleableGroupAction- Parameters:
obj- The object the function act on
-
-