public class FileLockThread
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
java.lang.Exception |
lastException |
static java.lang.String |
OP_LOCK |
static java.lang.String |
OP_READ |
static java.lang.String |
OP_UNLOCK |
static java.lang.String |
OP_WRITE |
| Constructor and Description |
|---|
FileLockThread(java.lang.String name,
JSONObject _config) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkFileDoesNotChange()
This test gets a lock and holds it for a long time, reading the file at the beginning and the end and
assuring that nothing changed.
|
void |
die() |
void |
finishOpRecord(com.purplehillsbooks.testcase.FileLockThread.OpRecord or,
java.lang.Exception e) |
void |
incrementLocalJSON() |
int |
incrementOneValue(JSONObject output,
java.lang.String name) |
void |
report(java.io.PrintStream out) |
void |
reportStats(java.io.PrintStream out,
java.lang.String op) |
void |
run() |
com.purplehillsbooks.testcase.FileLockThread.OpRecord |
startOpRecord(java.lang.String oper) |
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, yieldpublic java.lang.Exception lastException
public static final java.lang.String OP_LOCK
public static final java.lang.String OP_UNLOCK
public static final java.lang.String OP_READ
public static final java.lang.String OP_WRITE
public FileLockThread(java.lang.String name,
JSONObject _config)
throws java.lang.Exception
java.lang.Exceptionpublic void die()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void incrementLocalJSON()
throws java.lang.Exception
java.lang.Exceptionpublic int incrementOneValue(JSONObject output, java.lang.String name) throws java.lang.Exception
java.lang.Exceptionpublic void report(java.io.PrintStream out)
throws java.lang.Exception
java.lang.Exceptionpublic void checkFileDoesNotChange()
throws java.lang.Exception
java.lang.Exceptionpublic void finishOpRecord(com.purplehillsbooks.testcase.FileLockThread.OpRecord or,
java.lang.Exception e)
public com.purplehillsbooks.testcase.FileLockThread.OpRecord startOpRecord(java.lang.String oper)
public void reportStats(java.io.PrintStream out,
java.lang.String op)