public class TriggeredThread
extends java.lang.Thread
| Constructor and Description |
|---|
TriggeredThread() |
TriggeredThread(java.lang.String name) |
TriggeredThread(java.lang.String name,
java.lang.Runnable task) |
| Modifier and Type | Method and Description |
|---|---|
double |
getMeasuredSpeed()
Total measured speed, in runs per second.
|
double |
getRecentMeasuredSpeed()
Actual task frequency, in runs per second, over the last 100 samples.
|
java.lang.Runnable |
getTask() |
void |
run() |
void |
runTask()
By default, this runs the runnable.
|
void |
setTask(java.lang.Runnable newTask) |
void |
stopRunning()
Tells the thread to quit looping.
|
void |
trigger()
Tickles the thread and tells it to run its action.
|
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 TriggeredThread()
public TriggeredThread(java.lang.String name)
public TriggeredThread(java.lang.String name,
java.lang.Runnable task)
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void trigger()
public void runTask()
throws java.lang.Exception
java.lang.Exceptionpublic void stopRunning()
public void setTask(java.lang.Runnable newTask)
public java.lang.Runnable getTask()
public double getMeasuredSpeed()
public double getRecentMeasuredSpeed()