|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.sun.slamd.server.LoggerThread
This class implements a thread that can be used to asynchronously write information to a specified log file. It works in conjunction with the SLAMD logger so that when the SLAMD logger is configured to work asynchronously it will write any messages to be logged into a memory-based queue. The logger thread will then periodically poll that queue to see if there are any messages to be logged. If so, then those messages will be written into the log file and the queue emptied. In this manner, the overhead associated with logging will not adversely impact the performance of the SLAMD server. Note that there will not be any debug logging performed in this class in order to prevent logging loops. However, significant events will be written to standard error.
| Field Summary | |
static java.lang.String |
CONFIG_SUBSCRIBER_NAME
The name used to register the logger as a subscriber to the configuration handler. |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
LoggerThread(SLAMDServer slamdServer,
Logger logger)
Creates the logging thread and retrieves any pertinent configuration information from the configuration handler. |
|
| Method Summary | |
java.lang.String |
getSubscriberName()
Retrieves the name that the logger thread uses to subscribe to the configuration handler in order to be notified of configuration changes. |
ParameterList |
getSubscriberParameters()
Retrieves the set of configuration parameters associated with this configuration subscriber. |
void |
refreshSubscriberConfiguration()
Re-reads all configuration information used by the logger thread. |
void |
refreshSubscriberConfiguration(java.lang.String parameterName)
Re-reads all configuration information used by the logger thread. |
void |
run()
Performs the work of actually polling the logger's queue and writing any information that it finds there into the log file. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String CONFIG_SUBSCRIBER_NAME
| Constructor Detail |
public LoggerThread(SLAMDServer slamdServer,
Logger logger)
slamdServer - The SLAMD server with which this logging thread will
be associated.logger - The SLAMD logger whose queue this logging thread will
watch.| Method Detail |
public void run()
run in interface java.lang.Runnablepublic java.lang.String getSubscriberName()
getSubscriberName in interface ConfigSubscriberpublic ParameterList getSubscriberParameters()
getSubscriberParameters in interface ConfigSubscriberpublic void refreshSubscriberConfiguration()
refreshSubscriberConfiguration in interface ConfigSubscriberpublic void refreshSubscriberConfiguration(java.lang.String parameterName)
refreshSubscriberConfiguration in interface ConfigSubscriberparameterName - The name of the parameter to be re-read from the
configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||