|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.base.stats.StatsTaskEngine
public class StatsTaskEngine
A class to manage the execution of tasks in the Jive system. A TaskEngine object accepts Runnable objects and queues them for execution by worker threads. Optionally, a priority may be assigned to each task. Tasks with a higher priority are taken from the queue first.
| Field Summary | |
|---|---|
static int |
HIGH_PRIORITY
|
static int |
LOW_PRIORITY
|
static int |
MEDIUM_PRIORITY
|
| Method Summary | |
|---|---|
static void |
addTask(int priority,
java.lang.Runnable task)
Adds a task to the task queue. |
static void |
addTask(java.lang.Runnable task)
Adds a task to the task queue. |
static int |
getNumWorkers()
Returns the number of worker threads. |
static void |
restart()
Restarts the task engine service. |
static java.util.TimerTask |
scheduleTask(int priority,
java.lang.Runnable task,
java.util.Date date)
Schedules a task to be run once after a specified delay. |
static java.util.TimerTask |
scheduleTask(int priority,
java.lang.Runnable task,
long delay,
long period)
Schedules a task to periodically run. |
static java.util.TimerTask |
scheduleTask(java.lang.Runnable task,
java.util.Date date)
Schedules a task to be run once after a specified delay. |
static java.util.TimerTask |
scheduleTask(java.lang.Runnable task,
long delay,
long period)
Schedules a task to periodically run. |
static void |
shutdown()
Shuts down the task engine service. |
static int |
size()
Returns the current size of the task queue, which is the number of work items waiting to be processed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HIGH_PRIORITY
public static final int MEDIUM_PRIORITY
public static final int LOW_PRIORITY
| Method Detail |
|---|
public static int size()
public static int getNumWorkers()
public static void addTask(java.lang.Runnable task)
task - the task to execute
public static void addTask(int priority,
java.lang.Runnable task)
priority - the priority of the task in the queue.task - the task to execute
public static java.util.TimerTask scheduleTask(java.lang.Runnable task,
java.util.Date date)
task - task to be scheduled.date - the date in milliseconds at which the task is to be executed.
public static java.util.TimerTask scheduleTask(int priority,
java.lang.Runnable task,
java.util.Date date)
priority - the priority of the task in the queue.task - task to be scheduled.date - the date in milliseconds at which the task is to be executed.
public static java.util.TimerTask scheduleTask(java.lang.Runnable task,
long delay,
long period)
task - task to be scheduled.delay - delay in milliseconds before task is to be executed.period - time in milliseconds between successive task executions.
public static java.util.TimerTask scheduleTask(int priority,
java.lang.Runnable task,
long delay,
long period)
priority - the priority of the task in the queue.task - task to be scheduled.delay - delay in milliseconds before task is to be executed.period - time in milliseconds between successive task executions.
public static void shutdown()
public static void restart()
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||