mx4j.tools.stats
Class AbstractStatisticsRecorder
java.lang.Object
mx4j.tools.stats.AbstractStatisticsRecorder
- javax.management.MBeanRegistration, StatisticsRecorderMBean
public abstract class AbstractStatisticsRecorder
extends java.lang.Object
Class AbstractStatisticsRecorder. Abstract Parent of the Stats collector
classes. It implements some basic services
protected void | addEntry(Date key, 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
|
Number | getAverage() - Returns the Average Value
|
SortedMap | getEntries() - Returs a sorted map of the recorded values indexed by PointTime
|
protected Logger | getLogger()
|
Number | getMax() - Returns the Maximum Value
|
int | getMaxEntries() - Returns how many entries may be recorded.
|
Number | getMin() - Returns the Minimum Value
|
Date | getRecordingStart() - Returns the date when it started recording
|
boolean | isActive() - Indicates whether the MBean is recording values
|
void | postDeregister()
|
void | postRegister(Boolean registrationDone)
|
void | preDeregister()
|
javax.management.ObjectName | preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
|
void | setMaxEntries(int maxEntries) - Sets the maximum entries stored in this recorder
|
void | start() - Starts recording a variable
|
void | stop() - Stops recording a variable
|
averageValue
protected double averageValue
count
protected long count
entries
protected SortedMap entries
isActive
protected boolean isActive
isDouble
protected boolean isDouble
maxEntries
protected int maxEntries
maximumValue
protected double maximumValue
minimumValue
protected double minimumValue
recordingStart
protected Date recordingStart
server
protected javax.management.MBeanServer server
addEntry
protected void addEntry(Date key,
Number value)
Adds an entry to the collection. It also reduces the size if too big
and updates the statics
doStart
protected void doStart()
throws Exception
Subclasses may override this to offer a custom startup procedure
doStop
protected void doStop()
throws Exception
Subclasses may override this to offer a custom stop procedure
getLogger
protected Logger getLogger()
getMaxEntries
public int getMaxEntries()
Returns how many entries may be recorded. When the maximum amount is
reached the default behaviour is to forget the oldest one
- getMaxEntries in interface StatisticsRecorderMBean
postDeregister
public void postDeregister()
- postDeregister in interface javax.management.MBeanRegistration
postRegister
public void postRegister(Boolean registrationDone)
- postRegister in interface javax.management.MBeanRegistration
preDeregister
public void preDeregister()
throws Exception
- preDeregister in interface javax.management.MBeanRegistration
preRegister
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws Exception
- preRegister in interface javax.management.MBeanRegistration
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.