|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
ParkNPark.tests.FaultInjector
public class FaultInjector
Fault injector background thread that injects random faults into the servers. This fault injector presently implements the following faults:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected boolean |
exit
Our thread exit flag |
protected int |
faultInjectionMaxDelay
The maximum delay of the fault injection in milliseconds |
protected int |
faultInjectionMinDelay
The minimum delay of the fault injection in milliseconds |
protected NameService |
nameService
Instance of our common name service management object |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
FaultInjector(NameService nameService,
int faultInjectionMinDelay,
int faultInjectionMaxDelay)
Creates a new fault injector using the given NameService helper object |
Method Summary | |
---|---|
void |
beginExit()
Tells this thread to begin its graceful shutdown |
void |
run()
Runs the fault injector |
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 |
Field Detail |
---|
protected NameService nameService
protected boolean exit
protected int faultInjectionMinDelay
protected int faultInjectionMaxDelay
Constructor Detail |
---|
public FaultInjector(NameService nameService, int faultInjectionMinDelay, int faultInjectionMaxDelay)
nameService
- The NameService helper object to query
the running servers fromfaultInjectionMinDelay
- The minimum delay of the fault
injector in millisecondsfaultInjectionMinDelay
- The maximum delay of the fault
injector in millisecondsMethod Detail |
---|
public void beginExit()
public void run()
run
in interface Runnable
run
in class Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |