|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.knowgate.scheduler.SchedulerDaemon
public class SchedulerDaemon
Scheduler daemon
Keeps a thread pool and an atom queue for feeding the pool.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SchedulerDaemon(java.lang.String sPropertiesFilePath)
Create new SchedulerDaemon |
|
| Method Summary | |
|---|---|
void |
abortJob(java.lang.String sGuJob)
Abort a given Job |
AtomQueue |
atomQueue()
|
java.util.Date |
creationDate()
Get date when this SchedulerDaemon was created |
DBBind |
databaseBind()
|
void |
haltAll()
Halt worker threads and set running jobs status to suspended Wait until all running atoms are finished and then stop all worker threads |
static void |
main(java.lang.String[] argv)
|
void |
registerCallback(WorkerThreadCallback oNewCallback)
|
void |
run()
Create AtomQueue and start WorkerThreadPool |
java.util.Date |
startDate()
Get date when this SchedulerDaemon was started for the last time |
void |
stopAll()
Stop worker threads and set running jobs status to interrupted Default delay for forcing threads to stop is 10 seconds |
void |
stopAll(long lDelayMilis)
Stop worker threads and set running jobs status to interrupted Call haltAll() Wait until the specified amount of miliseconds and force all worker threads still alive to stop. |
java.util.Date |
stopDate()
Get date when this SchedulerDaemon was stopped for the last time |
WorkerThreadPool |
threadPool()
|
void |
unregisterCallback(java.lang.String sCallbackName)
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SchedulerDaemon(java.lang.String sPropertiesFilePath)
throws java.lang.ClassNotFoundException,
java.io.FileNotFoundException,
java.io.IOException,
java.sql.SQLException
Create new SchedulerDaemon
sPropertiesFilePath - Full path to hipergate.cnf file.java.lang.ClassNotFoundException
java.io.FileNotFoundException
java.io.IOException
java.sql.SQLException| Method Detail |
|---|
public java.util.Date creationDate()
public java.util.Date startDate()
public java.util.Date stopDate()
public AtomQueue atomQueue()
public WorkerThreadPool threadPool()
public DBBind databaseBind()
public void run()
Create AtomQueue and start WorkerThreadPool
run in interface java.lang.Runnablerun in class java.lang.Thread
public void registerCallback(WorkerThreadCallback oNewCallback)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void unregisterCallback(java.lang.String sCallbackName)
public void abortJob(java.lang.String sGuJob)
throws java.sql.SQLException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.io.FileNotFoundException
Abort a given Job
sGuJob - GUID of Job to be aborted
SQLException, - ClassNotFoundException
java.sql.SQLException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.FileNotFoundException
public void haltAll()
throws java.lang.IllegalStateException
Halt worker threads and set running jobs status to suspended
Wait until all running atoms are finished and then stop all worker threads
java.lang.IllegalStateException - If worker threads are not running
public void stopAll(long lDelayMilis)
throws java.lang.IllegalStateException,
java.sql.SQLException
Stop worker threads and set running jobs status to interrupted
Call haltAll() Wait until the specified amount of miliseconds and force all worker threads still alive to stop. This method must only be used when stalled worker threads cannot be stopped by calling haltAll().
lDelayMilis - long Delay (in miliseconds) to wait before executing
threads are forced to stop
java.lang.IllegalStateException - If worker threads are not running
java.sql.SQLException
public void stopAll()
throws java.lang.IllegalStateException,
java.sql.SQLException
Stop worker threads and set running jobs status to interrupted
Default delay for forcing threads to stop is 10 seconds
java.lang.IllegalStateException - If worker threads are not running
java.sql.SQLException
public static void main(java.lang.String[] argv)
throws java.lang.ClassNotFoundException,
java.sql.SQLException,
java.io.IOException
java.lang.ClassNotFoundException
java.sql.SQLException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||