|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jlf.vitals.VitalsCaptureProcessor
The VitalsCaptureThread
class, every second or so, runs through
all the vitals that should be collected periodically and captures a
measurement on each vital sign that needs to be collected.
Field Summary | |
protected java.util.Collection |
cachedVitals
Caches a set of vital signs to capture, so as to not lock up the vitals manager's collection of them. |
protected long |
cachedVitalsUsed
Number of times the processor used the cached copy of periodic vitals. |
protected java.lang.Thread |
captureThread
Holds the thread capturing vitals. |
protected static VitalsCaptureProcessor |
singleton
Holds the current singleton instance of the class. |
protected boolean |
stopThread
This flag could be changed to stop the thread from capturing any more resources. |
protected static long |
threadNumber
The unique identifier for the thread. |
Constructor Summary | |
protected |
VitalsCaptureProcessor()
Default constructor, starts a thread capturing vitals. |
Method Summary | |
protected void |
collectMeasurements()
Runs through a set of cached vitals and collect a current measurement on each of them. |
protected java.lang.Thread |
createCaptureThread()
Helper method to create a thread that runs this class to capture vitals. |
protected java.util.Collection |
getCachedVitals()
Manages the cached vitals variable, getting a collection from the vitals manager and refreshing it every so often. |
static VitalsCaptureProcessor |
getInstance()
Gets the current thread responsible for capturing vitals. |
boolean |
isCapturingVitals()
Tells if the current vitals capture processor thread is set to capture vitals. |
void |
run()
Main method to collect measurements. |
protected void |
setStopThread(boolean stopThreadFlag)
Sets the stopThread flag to stop the thread next time through its run loop, to be used when the thread is no longer needed. |
void |
startCapturingVitals()
Starts a new thread (stopping any current thread first) to capture vitals. |
void |
stopCapturingVitals()
Stops the current thread from capturing vitals. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static VitalsCaptureProcessor singleton
protected static long threadNumber
protected java.lang.Thread captureThread
protected boolean stopThread
protected java.util.Collection cachedVitals
protected long cachedVitalsUsed
Constructor Detail |
protected VitalsCaptureProcessor()
Method Detail |
public static VitalsCaptureProcessor getInstance()
protected java.lang.Thread createCaptureThread()
protected void setStopThread(boolean stopThreadFlag)
public void stopCapturingVitals()
public void startCapturingVitals()
public boolean isCapturingVitals()
protected java.util.Collection getCachedVitals()
protected void collectMeasurements()
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |