org.enhydra.shark.client.utilities
Class LimitChecker
java.lang.Object
java.lang.Thread
org.enhydra.shark.client.utilities.LimitChecker
- All Implemented Interfaces:
- java.lang.Runnable
- public class LimitChecker
- extends java.lang.Thread
Checks limits on running processes, and aborts ones which riched that limit.
- Author:
- Sasa Bojanic
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary |
LimitChecker(java.lang.String username,
java.util.List limitStructs,
long delay,
int instPerTrans,
int failToIgnore)
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 |
username
protected java.lang.String username
delay
protected long delay
instancesPerTransaction
protected int instancesPerTransaction
failuresToIgnore
protected int failuresToIgnore
stopped
protected boolean stopped
limitStructs
protected java.util.List limitStructs
LimitChecker
public LimitChecker(java.lang.String username,
java.util.List limitStructs,
long delay,
int instPerTrans,
int failToIgnore)
setDelay
public void setDelay(long delay)
setLimitStructs
public void setLimitStructs(java.util.List ls)
setInstancesPerTransaction
public void setInstancesPerTransaction(int insPerTrans)
setFailuresToIgnore
public void setFailuresToIgnore(int failToIgnore)
stopChecker
public void stopChecker()
startChecker
public void startChecker()
run
public void run()
runMe
protected void runMe()
checkLimits
protected void checkLimits(java.util.List instancesToCheck)
throws java.lang.Exception
- Throws:
java.lang.Exception
checkLimitStructs
protected boolean checkLimitStructs()
throws java.lang.Exception
- Throws:
java.lang.Exception
updateLimitStructs
protected void updateLimitStructs()