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 voidaddValue(ExtendedStatistic statistic, double value) it adds the value to the statistic.protected abstract intgetIndex(ExtendedStatistic statistic) final doublegetValue(ExtendedStatistic statistic) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ExtendedStatisticsContainerit adds the value to the statistic. If the statistic does not exist in this container, it fails silently- Specified by:
addValuein interfaceExtendedStatisticsContainer
-
getValue
- Specified by:
getValuein 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_INDEXif the statistic does not exist in this container
-