public final class InstantBusyThread extends AbstractBusyThread implements BusyThread
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
environment |
private java.lang.reflect.Method |
freememExecMethod |
private java.lang.Long |
handle |
private java.lang.reflect.Method |
jobCountMethod |
private java.lang.reflect.Method |
jobExecMethod |
private static java.util.TreeMap<java.lang.Long,java.lang.String> |
jobs |
busytime, memuse, running
Constructor and Description |
---|
InstantBusyThread(java.lang.Object env,
java.lang.String jobExec,
java.lang.String jobCount,
java.lang.String freemem,
long idleSleep,
long busySleep) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
freemem()
is called when an outOfMemoryCycle is performed
this method should try to free some memory, so that the job can be executed
|
int |
getJobCount() |
boolean |
job()
performes one job procedure; this loopes until terminate() is called
|
static BusyThread |
oneTimeJob(java.lang.Object env,
java.lang.String jobExec,
long startupDelay) |
static WorkflowThread |
oneTimeJob(java.lang.Runnable thread,
long startupDelay) |
void |
open() |
getBusyCycles, getBusySleep, getHighCPUCycles, getIdleCycles, getIdleSleep, getOutOfMemoryCycles, getSleepTime, intermission, notifyThread, run, setBusySleep, setIdleSleep, setLoadPreReqisite, setMemPreReqisite, setObeyIntermission, setStartupSleep
announceThreadBlockApply, announceThreadBlockRelease, getBlockTime, getExecTime, getLongDescription, getMemoryUse, getMonitorURL, getShortDescription, jobExceptionHandler, setDescription, shutdownInProgress, terminate
activeCount, checkAccess, clone, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBusyCycles, getBusySleep, getHighCPUCycles, getIdleCycles, getIdleSleep, getOutOfMemoryCycles, getSleepTime, intermission, setBusySleep, setIdleSleep, setLoadPreReqisite, setMemPreReqisite, setObeyIntermission, setStartupSleep
getBlockTime, getExecTime, getLongDescription, getMemoryUse, getMonitorURL, getShortDescription, isAlive, jobExceptionHandler, setDescription, shutdownInProgress, start, terminate
private java.lang.reflect.Method jobExecMethod
private java.lang.reflect.Method jobCountMethod
private java.lang.reflect.Method freememExecMethod
private final java.lang.Object environment
private final java.lang.Long handle
private static final java.util.TreeMap<java.lang.Long,java.lang.String> jobs
public InstantBusyThread(java.lang.Object env, java.lang.String jobExec, java.lang.String jobCount, java.lang.String freemem, long idleSleep, long busySleep)
public int getJobCount()
getJobCount
in interface WorkflowThread
public boolean job() throws java.lang.Exception
BusyThread
job
in interface BusyThread
java.lang.Exception
public void freemem()
BusyThread
freemem
in interface BusyThread
public static BusyThread oneTimeJob(java.lang.Object env, java.lang.String jobExec, long startupDelay)
public static WorkflowThread oneTimeJob(java.lang.Runnable thread, long startupDelay)
public void open()
open
in interface WorkflowThread
open
in class AbstractThread
public void close()
close
in interface WorkflowThread
close
in class AbstractThread