Package org.infinispan.stats.container
Class BaseExtendedStatisticsContainer
- java.lang.Object
-
- org.infinispan.stats.container.BaseExtendedStatisticsContainer
-
- All Implemented Interfaces:
ExtendedStatisticsContainer
- Direct Known Subclasses:
LocalExtendedStatisticsContainer
,RemoteExtendedStatisticsContainer
public abstract class BaseExtendedStatisticsContainer extends Object implements ExtendedStatisticsContainer
Common logic for theExtendedStatisticsContainer
- Since:
- 6.0
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description protected double[]
stats
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseExtendedStatisticsContainer(int size)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addValue(ExtendedStatistic statistic, double value)
it adds the value to the statistic.protected abstract int
getIndex(ExtendedStatistic statistic)
double
getValue(ExtendedStatistic statistic)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.stats.container.ExtendedStatisticsContainer
mergeTo
-
-
-
-
Method Detail
-
addValue
public final void addValue(ExtendedStatistic statistic, double value)
Description copied from interface:ExtendedStatisticsContainer
it adds the value to the statistic. If the statistic does not exist in this container, it fails silently- Specified by:
addValue
in interfaceExtendedStatisticsContainer
-
getValue
public final double getValue(ExtendedStatistic statistic) throws ExtendedStatisticNotFoundException
- Specified by:
getValue
in interfaceExtendedStatisticsContainer
- Returns:
- the current value of the statistic
- Throws:
ExtendedStatisticNotFoundException
- if the statistic was not found in this container
-
getIndex
protected abstract int getIndex(ExtendedStatistic statistic)
- Returns:
- the index of the statistic in this container. It return
ExtendedStatistic.NO_INDEX
if the statistic does not exist in this container
-
-