Class BaseExtendedStatisticsContainer
java.lang.Object
org.infinispan.extendedstats.container.BaseExtendedStatisticsContainer
- All Implemented Interfaces:
ExtendedStatisticsContainer
- Direct Known Subclasses:
LocalExtendedStatisticsContainer
,RemoteExtendedStatisticsContainer
public abstract class BaseExtendedStatisticsContainer
extends Object
implements ExtendedStatisticsContainer
Common logic for the
ExtendedStatisticsContainer
- Since:
- 6.0
- Author:
- Pedro Ruivo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addValue
(ExtendedStatistic statistic, double value) it adds the value to the statistic.protected abstract int
getIndex
(ExtendedStatistic statistic) final 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.extendedstats.container.ExtendedStatisticsContainer
mergeTo
-
Field Details
-
stats
protected final double[] stats
-
-
Constructor Details
-
BaseExtendedStatisticsContainer
protected BaseExtendedStatisticsContainer(int size)
-
-
Method Details
-
addValue
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
- Specified by:
getValue
in interfaceExtendedStatisticsContainer
- Returns:
- the current value of the statistic
- Throws:
ExtendedStatisticNotFoundException
- if the statistic was not found in this container
-
getIndex
- Returns:
- the index of the statistic in this container. It return
ExtendedStatistic.NO_INDEX
if the statistic does not exist in this container
-