|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.adaptors.ProcessScheduler
public class ProcessScheduler
This class is responsible for running list of threads at a specified interval. This class can be used to run a list of specified task to run at regular intervals.
com.adventnet.agent.utilities.scheduler.Scheduler| Method Summary | |
|---|---|
void |
addProcess(java.lang.String id,
java.lang.Runnable run)
Adds a task to the list of tasks that will be executed at regualar intervals. |
int |
getMaxThreads()
Returns the value of max threads. |
long |
getProcessInterval()
Returns the time interval at which the listed process will be executed by the schedular |
static ProcessScheduler |
getProcessScheduler(java.lang.String schedulerName)
Factory method to create/get a ProcessScheduler object. The processSchedular object is responsible for executing the list of threads added to the list using addProcess method |
void |
removeProcess(java.lang.String id)
Removes a process from the list of tasks to be executed. |
static void |
removeScheduler(java.lang.String schedulerName)
This method removes the schedular and donot run any thread listed in its list |
void |
setMaxThreads(int maxThreads)
Sets the value of max threads. |
void |
setProcessInterval(long time)
Sets the time interval at which the listed process will be executed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ProcessScheduler getProcessScheduler(java.lang.String schedulerName)
public static void removeScheduler(java.lang.String schedulerName)
public long getProcessInterval()
public void setProcessInterval(long time)
public int getMaxThreads()
public void setMaxThreads(int maxThreads)
maxThreads - The Maximum number of threads for scheduling the volatility threads.
public void addProcess(java.lang.String id,
java.lang.Runnable run)
public void removeProcess(java.lang.String id)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||