Package com.sun.corba.se.spi.monitoring
Class StatisticMonitoredAttribute
java.lang.Object
com.sun.corba.se.spi.monitoring.MonitoredAttributeBase
com.sun.corba.se.spi.monitoring.StatisticMonitoredAttribute
- All Implemented Interfaces:
MonitoredAttribute
- Author:
- Hemanth Puttaswamy
StatisticsMonitoredAttribute is provided as a convenience to collect the Statistics of any entity. The getValue() call will be delegated to the StatisticsAccumulator set by the user.
-
Constructor Summary
ConstructorsConstructorDescriptionStatisticMonitoredAttribute(String name, String desc, StatisticsAccumulator s, Object mutex) Constructs the StaisticMonitoredAttribute, builds the required MonitoredAttributeInfo with Long as the class type and is always readonly attribute. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the state on Statistics Accumulator, After this call all samples are treated fresh and the old sample computations are disregarded.Gets the statistics accumulator associated with StatisticMonitoredAttribute.getValue()Gets the value from the StatisticsAccumulator, the value will be a formatted String with the computed statistics based on the samples accumulated in the Statistics Accumulator.Methods inherited from class com.sun.corba.se.spi.monitoring.MonitoredAttributeBase
getAttributeInfo, getName, setValue
-
Constructor Details
-
StatisticMonitoredAttribute
Constructs the StaisticMonitoredAttribute, builds the required MonitoredAttributeInfo with Long as the class type and is always readonly attribute.
- Parameters:
name- Of this attributedesc- should provide a good description on the kind of statistics collected, a good example is "Connection Response Time Stats will Provide the detailed stats based on the samples provided from every request completion time"s- is the StatisticsAcumulator that user will use to accumulate the samples and this Attribute Object will get the computed statistics values from.mutex- using which clearState() and getValue() calls need to be locked.
-
-
Method Details
-
getValue
Gets the value from the StatisticsAccumulator, the value will be a formatted String with the computed statistics based on the samples accumulated in the Statistics Accumulator.- Specified by:
getValuein interfaceMonitoredAttribute- Specified by:
getValuein classMonitoredAttributeBase
-
clearState
public void clearState()Clears the state on Statistics Accumulator, After this call all samples are treated fresh and the old sample computations are disregarded.- Specified by:
clearStatein interfaceMonitoredAttribute- Overrides:
clearStatein classMonitoredAttributeBase
-
getStatisticsAccumulator
Gets the statistics accumulator associated with StatisticMonitoredAttribute. Usually, the user don't need to use this method as they can keep the handle to Accumulator to collect the samples.
-