public class MemorySampler extends GenericService implements SampleListener
A MemorySampler obtains samples from a Sampler and stores them in memory for display through the administrative UI. The number of samples that can be stored is determined by the "sampleListSize" property.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
MemorySampler()
Constructs a blank new MemorySampler
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptSample(SampleEvent pSampleEvent)
This is called when a new SampleEvent is available
|
protected javax.servlet.Servlet |
createAdminServlet()
Creates and returns a new Servlet that will administer this
service.
|
void |
doStartService()
This will initialize the service
|
int |
getSampleCount()
Returns the number of samples in the list
|
int |
getSampleListSize()
Returns the maximum number of samples that will be stored
|
void |
setSampleListSize(int pSampleListSize)
Sets the maximum number of samples that will be stored
|
addLogListener, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic void setSampleListSize(int pSampleListSize)
public int getSampleListSize()
public int getSampleCount()
public void acceptSample(SampleEvent pSampleEvent)
acceptSample in interface SampleListenerpSampleEvent - the sample listpublic void doStartService()
doStartService in class GenericServiceprotected javax.servlet.Servlet createAdminServlet()
createAdminServlet in class GenericService