Interface Statistic

All Known Implementing Classes:
i18nStatistic

public interface Statistic
A statistic being tracked by the server.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The type of statistic.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a description of the stat.
    Returns the name of a stat.
    Returns the type of a stat.
    Returns the units that relate to the stat.
    boolean
    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
    Returns the current sample of data.
  • Method Details

    • 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.