org.apache.activemq.management
Class StatisticImpl

java.lang.Object
  extended by org.apache.activemq.management.StatisticImpl
All Implemented Interfaces:
javax.management.j2ee.statistics.Statistic, Resettable
Direct Known Subclasses:
BoundaryStatisticImpl, CountStatisticImpl, PollCountStatisticImpl, RangeStatisticImpl, StatsImpl, TimeStatisticImpl

public class StatisticImpl
extends java.lang.Object
implements javax.management.j2ee.statistics.Statistic, Resettable

Base class for a Statistic implementation


Field Summary
protected  boolean enabled
           
 
Constructor Summary
StatisticImpl(java.lang.String name, java.lang.String unit, java.lang.String description)
           
 
Method Summary
protected  void appendFieldDescription(java.lang.StringBuffer buffer)
           
 java.lang.String getDescription()
           
 long getLastSampleTime()
           
 java.lang.String getName()
           
 long getStartTime()
           
 java.lang.String getUnit()
           
 boolean isDoReset()
           
 boolean isEnabled()
           
 void reset()
          Reset the statistic
 void setDoReset(boolean doReset)
           
 void setEnabled(boolean enabled)
           
 java.lang.String toString()
           
protected  void updateSampleTime()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

enabled

protected boolean enabled
Constructor Detail

StatisticImpl

public StatisticImpl(java.lang.String name,
                     java.lang.String unit,
                     java.lang.String description)
Method Detail

reset

public void reset()
Description copied from interface: Resettable
Reset the statistic

Specified by:
reset in interface Resettable

updateSampleTime

protected void updateSampleTime()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getName

public java.lang.String getName()
Specified by:
getName in interface javax.management.j2ee.statistics.Statistic

getUnit

public java.lang.String getUnit()
Specified by:
getUnit in interface javax.management.j2ee.statistics.Statistic

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface javax.management.j2ee.statistics.Statistic

getStartTime

public long getStartTime()
Specified by:
getStartTime in interface javax.management.j2ee.statistics.Statistic

getLastSampleTime

public long getLastSampleTime()
Specified by:
getLastSampleTime in interface javax.management.j2ee.statistics.Statistic

isEnabled

public boolean isEnabled()
Returns:
the enabled

setEnabled

public void setEnabled(boolean enabled)
Parameters:
enabled - the enabled to set

isDoReset

public boolean isDoReset()
Returns:
the doReset

setDoReset

public void setDoReset(boolean doReset)
Parameters:
doReset - the doReset to set

appendFieldDescription

protected void appendFieldDescription(java.lang.StringBuffer buffer)


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.