|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.scheduling.JPPFScheduleHandler
public class JPPFScheduleHandler
This class handles a timer.
| Nested Class Summary | |
|---|---|
class |
JPPFScheduleHandler.ScheduleHandlerTask
Timer task that triggers an action when the corresponding schedule date is reached. |
| Constructor Summary | |
|---|---|
JPPFScheduleHandler()
Initialize this schedule handler with a default name. |
|
JPPFScheduleHandler(String name)
Initialize this schedule handler with the specified name. |
|
| Method Summary | |
|---|---|
void |
cancelAction(Object key)
Cancel the scheduled action identified by the specified key. |
void |
clear()
Cleanup this schedule handler. |
void |
clear(boolean shutdown)
Shutdown this schedule handler. |
void |
scheduleAction(Object key,
JPPFSchedule schedule,
Runnable action)
Schedule an action. |
void |
scheduleAction(Object key,
JPPFSchedule schedule,
Runnable action,
long start)
Schedule an action. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JPPFScheduleHandler()
public JPPFScheduleHandler(String name)
name - the name given to this schedule handler.| Method Detail |
|---|
public void scheduleAction(Object key,
JPPFSchedule schedule,
Runnable action)
throws ParseException
key - key used to retrieve or cancel the action at a later time.schedule - the schedule at which the action is triggered.action - the action to perform when the schedule date is reached.
ParseException - if the schedule date could not be parsed
public void scheduleAction(Object key,
JPPFSchedule schedule,
Runnable action,
long start)
throws ParseException
key - key used to retrieve or cancel the action at a later time.schedule - the schedule at which the action is triggered.action - the action to perform when the schedule date is reached.start - the start time to use if the schedule is expressed as a durartion.
ParseException - if the schedule date could not be parsedpublic void cancelAction(Object key)
key - the key associated with the action.public void clear()
public void clear(boolean shutdown)
shutdown - flag indicating whether this scehdule handler should be shutdown.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||