|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.knowgate.scheduler.SingleThreadExecutor
public class SingleThreadExecutor
Single Thread Scheduler Executor
SingleThreadExecutor is a class that processes jobs and atoms in a simple way, unlike SchedulerDaemon witch is based on an AtomQueue and a WorkerThreadPool, SingleThreadExecutor uses directly the database for tracking execution progress for a single thread.
| 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 | |
|---|---|
SingleThreadExecutor(DBBind oDbb,
java.lang.String sJobId)
Create new SingleThreadExecutor for a single Job |
|
SingleThreadExecutor(java.util.Properties oProps,
java.lang.String sJobId)
Create new SingleThreadExecutor for a single Job |
|
SingleThreadExecutor(java.lang.String sPropertiesFilePath)
Create new SingleThreadExecutor |
|
SingleThreadExecutor(java.lang.String sPropertiesFilePath,
java.lang.String sJobId)
Create new SingleThreadExecutor for a single Job |
|
| Method Summary | |
|---|---|
Atom |
activeAtom()
|
Job |
activeJob()
|
void |
halt()
Halt thread execution commiting all operations in course before stopping If a thread is dead-locked by any reason halting it will not cause any effect. |
java.lang.String |
lastError()
|
static void |
main(java.lang.String[] argv)
|
void |
registerCallback(WorkerThreadCallback oNewCallback)
Register a thread callback object |
void |
run()
|
boolean |
unregisterCallback(java.lang.String sCallbackName)
Unregister a thread callback object |
| 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 SingleThreadExecutor(java.lang.String sPropertiesFilePath)
throws java.io.FileNotFoundException,
java.io.IOException
Create new SingleThreadExecutor
sPropertiesFilePath - Absolute path to hipergate.cnf properties file
java.io.FileNotFoundException
java.io.IOException
public SingleThreadExecutor(java.lang.String sPropertiesFilePath,
java.lang.String sJobId)
throws java.io.FileNotFoundException,
java.io.IOException
Create new SingleThreadExecutor for a single Job
sPropertiesFilePath - Absolute path to hipergate.cnf properties filesJobId - GUID of Job for which to process atoms,
if null the executor will process atoms for all pending jobs
java.io.FileNotFoundException
java.io.IOException
public SingleThreadExecutor(java.util.Properties oProps,
java.lang.String sJobId)
Create new SingleThreadExecutor for a single Job
oProps - Environment properties (usually taken from hipergate.cnf)sJobId - GUID of Job for which to process atoms,
if null the executor will process atoms for all pending jobs
public SingleThreadExecutor(DBBind oDbb,
java.lang.String sJobId)
Create new SingleThreadExecutor for a single Job
oDbb - DBBind used for accesing the satabasesJobId - GUID of Job for which to process atoms,
if null the executor will process atoms for all pending jobs| Method Detail |
|---|
public Atom activeAtom()
public Job activeJob()
public java.lang.String lastError()
public void registerCallback(WorkerThreadCallback oNewCallback)
throws java.lang.IllegalArgumentException
oNewCallback - WorkerThreadCallback subclass instance
java.lang.IllegalArgumentException - If a callback with same name has oNewCallback was already registeredpublic boolean unregisterCallback(java.lang.String sCallbackName)
sCallbackName - Name of callback to be unregistered
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void halt()
Halt thread execution commiting all operations in course before stopping
If a thread is dead-locked by any reason halting it will not cause any effect.
public static void main(java.lang.String[] argv)
throws java.io.FileNotFoundException,
java.io.IOException,
java.sql.SQLException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
org.xml.sax.SAXException
java.io.FileNotFoundException
java.io.IOException
java.sql.SQLException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
org.xml.sax.SAXException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||