|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmx4j.tools.stats.AbstractStatisticsRecorder
public abstract class AbstractStatisticsRecorder
Class AbstractStatisticsRecorder. Abstract Parent of the Stats collector classes. It implements some basic services
StatisticsRecorderMBean| Field Summary | |
|---|---|
protected double |
averageValue
|
protected long |
count
|
protected java.util.SortedMap |
entries
|
protected boolean |
isActive
|
protected boolean |
isDouble
|
protected int |
maxEntries
|
protected double |
maximumValue
|
protected double |
minimumValue
|
protected java.util.Date |
recordingStart
|
protected javax.management.MBeanServer |
server
|
| Constructor Summary | |
|---|---|
AbstractStatisticsRecorder()
|
|
| Method Summary | |
|---|---|
protected void |
addEntry(java.util.Date key,
java.lang.Number value)
Adds an entry to the collection. |
protected void |
doStart()
Subclasses may override this to offer a custom startup procedure |
protected void |
doStop()
Subclasses may override this to offer a custom stop procedure |
java.lang.Number |
getAverage()
Returns the Average Value |
java.util.SortedMap |
getEntries()
Returs a sorted map of the recorded values indexed by PointTime |
protected Logger |
getLogger()
|
java.lang.Number |
getMax()
Returns the Maximum Value |
int |
getMaxEntries()
Returns how many entries may be recorded. |
java.lang.Number |
getMin()
Returns the Minimum Value |
java.util.Date |
getRecordingStart()
Returns the date when it started recording |
boolean |
isActive()
Indicates whether the MBean is recording values |
void |
postDeregister()
Callback called just after the MBean has been successfully unregistered. |
void |
postRegister(java.lang.Boolean registrationDone)
Callback called just after the MBean has been registered (successfully or not). |
void |
preDeregister()
Callback called just before MBean unregistration from the MBeanServer. |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Callback called just before MBean registration in the MBeanServer. |
void |
setMaxEntries(int maxEntries)
Sets the maximum entries stored in this recorder |
void |
start()
Starts recording a variable |
void |
stop()
Stops recording a variable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean isActive
protected javax.management.MBeanServer server
protected int maxEntries
protected java.util.SortedMap entries
protected java.util.Date recordingStart
protected boolean isDouble
protected double minimumValue
protected double maximumValue
protected double averageValue
protected long count
| Constructor Detail |
|---|
public AbstractStatisticsRecorder()
| Method Detail |
|---|
protected Logger getLogger()
public void start()
StatisticsRecorderMBean
start in interface StatisticsRecorderMBeanpublic void stop()
StatisticsRecorderMBean
stop in interface StatisticsRecorderMBeanpublic java.lang.Number getAverage()
StatisticsRecorderMBean
getAverage in interface StatisticsRecorderMBeanpublic java.lang.Number getMin()
StatisticsRecorderMBean
getMin in interface StatisticsRecorderMBeanpublic java.lang.Number getMax()
StatisticsRecorderMBean
getMax in interface StatisticsRecorderMBeanpublic boolean isActive()
StatisticsRecorderMBean
isActive in interface StatisticsRecorderMBeanpublic int getMaxEntries()
StatisticsRecorderMBean
getMaxEntries in interface StatisticsRecorderMBeanpublic void setMaxEntries(int maxEntries)
StatisticsRecorderMBean
setMaxEntries in interface StatisticsRecorderMBeanpublic java.util.SortedMap getEntries()
StatisticsRecorderMBean
getEntries in interface StatisticsRecorderMBeanpublic java.util.Date getRecordingStart()
StatisticsRecorderMBean
getRecordingStart in interface StatisticsRecorderMBean
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
javax.management.MBeanRegistration
preRegister in interface javax.management.MBeanRegistrationserver - The MBeanServer on which the MBean will be registered.name - The ObjectName of the MBean.
ObjectName of the registered MBean, must not be null
java.lang.Exception - Any possible exception generated by this method will be caught
by the MBeanServer and re-thrown as an MBeanRegistrationException
to the client.public void postRegister(java.lang.Boolean registrationDone)
javax.management.MBeanRegistration
postRegister in interface javax.management.MBeanRegistrationregistrationDone - True if the registration was successful, false otherwise.
public void preDeregister()
throws java.lang.Exception
javax.management.MBeanRegistration
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exception - Any possible exception generated by this method will be caught
by the MBeanServer and re-thrown as an MBeanRegistrationException
to the client.public void postDeregister()
javax.management.MBeanRegistration
postDeregister in interface javax.management.MBeanRegistration
protected void doStart()
throws java.lang.Exception
java.lang.Exception
protected void doStop()
throws java.lang.Exception
java.lang.Exception
protected void addEntry(java.util.Date key,
java.lang.Number value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||