IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.stats
Interface Statistic

All Superinterfaces:
Serializable
All Known Subinterfaces:
ActiveCountStatistic, ActiveTimeStatistic, CountStatistic, PercentageStatistic, TimeStatistic

public interface Statistic
extends Serializable

This inteface represents statistical data. It is a generic statistic interface.

Since:
WAS XD 6.0.1

Method Summary
 void combine(Statistic otherStatistic)
          Combines the value of the provided statistic with this object.
 Statistic delta(Statistic otherStatistic)
          Gets the difference between two statistics.
 String getDescription()
          Gets the description of this statistic.
 int getId()
          Gets the statistic identifier.
 long getLastSampleTime()
          Gets the time the most recent measurement was taken.
 String getName()
          Gets the name of this statistic.
 long getStartTime()
          Gets the time the first measurement was taken.
 String getUnit()
          Gets the unit of measurement for this statistic.
 boolean isEnabled()
          Gets whether this statistic is being monitored.
 void reset()
          Resets the statistic to zero.
 String toString()
          Gets the String representation of this statistic.
 void update(Statistic newStatistic)
          Updates this statistic with the given value.
 

Method Detail

getName

String getName()
Gets the name of this statistic.

Returns:
the name of this statistic

getUnit

String getUnit()
Gets the unit of measurement for this statistic.

Returns:
the unit of measurement for this statistic

getDescription

String getDescription()
Gets the description of this statistic.

Returns:
the description of this statistic

getStartTime

long getStartTime()
Gets the time the first measurement was taken.

Returns:
the start time represented as a long

getLastSampleTime

long getLastSampleTime()
Gets the time the most recent measurement was taken.

Returns:
the last sample time represented as a long.

getId

int getId()
Gets the statistic identifier.

Returns:
the statistic ID

isEnabled

boolean isEnabled()
Gets whether this statistic is being monitored.

Returns:
true if monitoring for this statistic is enabled

update

void update(Statistic newStatistic)
Updates this statistic with the given value.

Parameters:
newStatistic - must have the same statistic ID and type

delta

Statistic delta(Statistic otherStatistic)
Gets the difference between two statistics.

The provided Statistic must have the same statistic ID and type. The returned Statistic value is calculated by subtracting the provided statistic from this object.

Parameters:
otherStatistic - a statistic to compare with
Returns:
the difference between this statistic and the specified parameter or null if the ID and type do not match

combine

void combine(Statistic otherStatistic)
Combines the value of the provided statistic with this object.

The provided Statistic must have the same statistic ID and type. If they ID and type do not match this method will do nothing.

Parameters:
otherStatistic - the statistic to combine with this object

reset

void reset()
Resets the statistic to zero.

Typically, this method is not called by the application.


toString

String toString()
Gets the String representation of this statistic.

Overrides:
toString in class Object
Returns:
a String represenation of this object

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.