public class TimerPool extends Object implements Triggerable
| Constructor and Description |
|---|
TimerPool(String name,
int poolSize,
boolean daemon,
Debug debug)
Constructor of TimerPool.
|
| Modifier and Type | Method and Description |
|---|---|
void |
schedule(TaskRunnable task,
Date time)
Schedules a TaskRunnable to the TimerPool.
|
void |
schedule(TaskRunnable task,
long delay)
Schedules the TaskRunnable to the TimerPool.
|
void |
shutdown()
Shuts down the TimerPool.
|
void |
trigger(Date time)
Implements the trigger function for Triggerable interface.
|
public TimerPool(String name, int poolSize, boolean daemon, Debug debug)
name - The name of the TimerPoolpoolSize - The size of the TimerPooldaemon - The boolean to indicate whether the threads in TimerPool
are daemondebug - Debug object to send debugging message to.public void schedule(TaskRunnable task, Date time) throws IllegalArgumentException, IllegalStateException
task - The TaskRunnable to be scheduledtime - The time to run the TaskRunnableIllegalArgumentExceptionIllegalStateExceptionpublic void schedule(TaskRunnable task, long delay) throws IllegalArgumentException, IllegalStateException
task - The TaskRunnable to be scheduleddelay - The time (in ms) to wait before running the taskIllegalArgumentExceptionIllegalStateExceptionpublic void trigger(Date time)
trigger in interface Triggerabletime - The time the HeadTaskRunnable scheduledpublic void shutdown()
Copyright © 2010–2023 Open Identity Platform Community. All rights reserved.