org.starhope.appius.util
Class DataRecordFlushThread
java.lang.Object
java.lang.Thread
org.starhope.appius.util.DataRecordFlushThread
- All Implemented Interfaces:
- Runnable
public class DataRecordFlushThread
- extends Thread
Perform asynchronous background flushes of data records that were
updated at some point, but haven't been written to the database
server yet — this process is designed to ensure that a flurry of data
record changes don't result in a massive surge of database writes as
well, as the likelihood is that the entire series of changes will be
written at a go.
- Author:
- brpocock@star-hope.org
Field Summary |
private long |
lastPingTime
The last time this thread was “pinged.” |
Method Summary |
void |
ping()
Keep the thread running for a while longer. |
void |
run()
|
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 |
lastPingTime
private long lastPingTime
- The last time this thread was “pinged.”
DataRecordFlushThread
public DataRecordFlushThread()
- WRITEME: Document this constructor brpocock@star-hope.org
ping
public void ping()
- Keep the thread running for a while longer. The thread will exit
“a while” after the last ping (configurable as
org.starhope.appius.dataFlushThread.pingLatency, default 30000 ms
= 30 s)
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
- See Also:
Thread.run()