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 protectedBaseExtendedStatisticsContainer(int size)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddValue(ExtendedStatistic statistic, double value)it adds the value to the statistic.protected abstract intgetIndex(ExtendedStatistic statistic)doublegetValue(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:ExtendedStatisticsContainerit adds the value to the statistic. If the statistic does not exist in this container, it fails silently- Specified by:
addValuein interfaceExtendedStatisticsContainer
-
getValue
public final double getValue(ExtendedStatistic statistic) throws ExtendedStatisticNotFoundException
- Specified by:
getValuein 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_INDEXif the statistic does not exist in this container
-
-