Openfire 3.4.1 Javadoc

org.jivesoftware.openfire.stats
Interface Statistic

All Known Implementing Classes:
i18nStatistic

public interface Statistic

A statistic being tracked by the server.

See Also:
StatisticsManager

Nested Class Summary
static class Statistic.Type
          The type of statistic.
 
Method Summary
 String getDescription()
          Returns a description of the stat.
 String getName()
          Returns the name of a stat.
 Statistic.Type getStatType()
          Returns the type of a stat.
 String getUnits()
          Returns the units that relate to the stat.
 boolean isPartialSample()
          Returns true if the sample value represents only the value of the cluster node or otherwise it represents the value of the entire cluster.
 double sample()
          Returns the current sample of data.
 

Method Detail

getName

String getName()
Returns the name of a stat.

Returns:
the name of a stat.

getStatType

Statistic.Type getStatType()
Returns the type of a stat.

Returns:
the type of a stat.

getDescription

String getDescription()
Returns a description of the stat.

Returns:
a description of the stat.

getUnits

String getUnits()
Returns the units that relate to the stat.

Returns:
the name of the units that relate to the stat.

sample

double sample()
Returns the current sample of data.

Returns:
a sample of the data.

isPartialSample

boolean isPartialSample()
Returns true if the sample value represents only the value of the cluster node or otherwise it represents the value of the entire cluster. Statistics that keep only a sample of the local node will need to get added up with the value of the other cluster nodes. On the other hand, statistics that hold the value of the entire cluster can be sampled in any cluster node and they don't need to get added up.

An example of a partial sample statistic would be network traffic. Each node keeps track of its own network traffic information. Whilst an example of a total sample statistic would be user sessions since every cluster node knows the total number of connected users across the cluster.

Returns:
true if the sample value represents only the value of the cluster node or otherwise it represents the value of the entire cluster.

Openfire 3.4.1 Javadoc

Copyright © 2003-2007 Jive Software.