|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
oemware.core.ThreadBase
oemware.core.SingleThread
oemware.core.SharedJobRunner
public final class SharedJobRunner
The shared job runner is a single thread that is used amongst
a group of low priority jobs. The jobs registered
should take less than a second to execute; additionally,
the jobs should be relatively infrequent (i.e., five seconds
or greater). The execution of the job is also not exact since
they're executed synchronously. The thread executes a check
once per mSleepTime (ms) to see if it should run any jobs.
All jobs are run on startup.
Set the mMaxTimeBeforeError attribute to log an error for
long running jobs.
The purpose of this component is to reduce the number of
monitor threads running in the instance (consuming resources).
You can create multiple job runner components in an instance.
| 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 oemware.core.ThreadBase |
|---|
mJoinThread, mJoinTimeout, mRunning |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SharedJobRunner()
|
|
| Method Summary | |
|---|---|
void |
execute()
Implement this method. |
java.util.List<SharedJob> |
getJobs()
|
long |
getMaxTimeBeforeError()
|
void |
setJobs(java.util.List<SharedJob> pJobs)
|
void |
setMaxTimeBeforeError(long pMaxTimeBeforeError)
|
| Methods inherited from class oemware.core.SingleThread |
|---|
getDeductExecuteTime, getSleepTime, run, setDeductExecuteTime, setSleepTime |
| Methods inherited from class oemware.core.ThreadBase |
|---|
afterStart, afterStop, beforeStart, beforeStop, getJoinThread, getJoinTimeout, isRunning, setJoinThread, setJoinTimeout, shutdown, startup |
| 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 SharedJobRunner()
| Method Detail |
|---|
public final void execute()
SingleThread
execute in class SingleThreadpublic final void setJobs(java.util.List<SharedJob> pJobs)
public final java.util.List<SharedJob> getJobs()
public final void setMaxTimeBeforeError(long pMaxTimeBeforeError)
public final long getMaxTimeBeforeError()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||