|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.cisco.services.tracing.TraceMessageThread
public abstract class TraceMessageThread
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
DEFAULT_STATISTICS_REPORTING_INTERVAL
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
TraceMessageThread(java.lang.String name)
|
Method Summary | |
---|---|
boolean |
getBatchMessages()
|
boolean |
getCatchExceptions()
|
boolean |
getCollectStatistics()
|
boolean |
getPeriodicWakeupEnabled()
|
long |
getPeriodicWakeupInterval()
|
int |
getStatisticsReportingInterval()
|
protected boolean |
initialize()
Invoked when the run method has just begun. |
boolean |
isRunning()
Returns the state of the TraceMessageThread. |
void |
run()
Subclasses of TraceMessageThread |
void |
sendTraceMessage(java.lang.Object myTraceMessage)
|
void |
setBatchMessages(boolean enabled)
Enable or disable trace message batching, that is, the ability for the TraceMessageThread to extract and process vectors of trace messages rather than single trace message at a time. |
void |
setCatchExceptions(boolean enabled)
Enable or disable exception handling when invoking the subclass's traceMessageReceived method. |
void |
setCollectStatistics(boolean enabled)
Enable or disable statistics gathering. |
void |
setPeriodicWakeupEnabled(boolean enabled)
Enable or disable periodic wakeups (for diagnostic purposes) |
void |
setPeriodicWakeupInterval(long interval)
Enable or disable periodic wakeups (for diagnostic purposes) |
void |
setStatisticsReportingInterval(int interval)
Set the statisticsReportingInterval, in iterations. |
void |
shutdown()
|
protected void |
shutdownComplete()
Invoked when the shutdown method has run to completion. |
protected void |
shutdownCompletePending()
Invoked when the shutdown method has run, but thread may still be alive. |
protected void |
statisticsGathered(int maxQueueDepth)
Invoked when the statistics gathering interval has expired. |
java.lang.String |
toString()
|
protected abstract void |
traceMessageReceived(java.lang.Object traceMessage)
Invoked every time the run method receives a trace message from its queue. |
protected void |
uninitialize()
Invoked when the run method is about to exit, if and only if initialize succeeded. |
Methods inherited from class java.lang.Thread |
---|
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, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_STATISTICS_REPORTING_INTERVAL
Constructor Detail |
---|
public TraceMessageThread(java.lang.String name)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Thread
public final void shutdown()
public final void sendTraceMessage(java.lang.Object myTraceMessage)
public final void setPeriodicWakeupEnabled(boolean enabled)
public final boolean getPeriodicWakeupEnabled()
public final void setPeriodicWakeupInterval(long interval)
public final long getPeriodicWakeupInterval()
public final void setBatchMessages(boolean enabled)
public final boolean getBatchMessages()
public final void setCatchExceptions(boolean enabled)
public final boolean getCatchExceptions()
public final void setCollectStatistics(boolean enabled)
public final boolean getCollectStatistics()
public final void setStatisticsReportingInterval(int interval)
public final int getStatisticsReportingInterval()
public final boolean isRunning()
public final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected boolean initialize()
protected abstract void traceMessageReceived(java.lang.Object traceMessage)
protected void uninitialize()
protected void shutdownComplete()
protected void shutdownCompletePending()
protected void statisticsGathered(int maxQueueDepth)
maxQueueDepth
- maximum number of trace messages in queue over the interval
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |