Package org.infinispan.stats.impl
Class LocalContainerStatsImpl
java.lang.Object
org.infinispan.stats.impl.AbstractClusterStats
org.infinispan.stats.impl.AbstractContainerStats
org.infinispan.stats.impl.LocalContainerStatsImpl
- All Implemented Interfaces:
JmxStatisticsExposer,ClusterContainerStats
@MBean(objectName="LocalContainerStats",
description="General statistic of local container.")
public class LocalContainerStatsImpl
extends AbstractContainerStats
implements ClusterContainerStats
Provide statistics of the local JVM instance. When the statistics collection is disabled, we return -1.
- Since:
- 14.0
- Author:
- José Bolina
-
Field Summary
FieldsFields inherited from class org.infinispan.stats.impl.AbstractContainerStats
MEMORY_AVAILABLE, MEMORY_MAX, MEMORY_TOTAL, MEMORY_USEDFields inherited from class org.infinispan.stats.impl.AbstractClusterStats
DEFAULT_STALE_STATS_THRESHOLDFields inherited from interface org.infinispan.stats.ClusterContainerStats
OBJECT_NAME -
Method Summary
Modifier and TypeMethodDescriptionlonglonglonglonglongvoidinit(GlobalConfiguration configuration) voidreset()Reset the collected statisticsvoidsetStaleStatsThreshold(long threshold) Methods inherited from class org.infinispan.stats.impl.AbstractContainerStats
getLocalStatMapsMethods inherited from class org.infinispan.stats.impl.AbstractClusterStats
getStaleStatsThreshold, getStatisticsEnabled, getTimeSinceReset, isStatisticsEnabled, reset, resetStatistics, setStaleStatsThreshold, setStatisticsEnabled
-
Field Details
-
LOCAL_CONTAINER_STATS
- See Also:
-
-
Method Details
-
init
-
statistics
- Specified by:
statisticsin classAbstractContainerStats- Throws:
Exception
-
getMemoryAvailable
@ManagedAttribute(description="The maximum amount of free memory in bytes in local JVM", displayName="Local available memory.") public long getMemoryAvailable()- Specified by:
getMemoryAvailablein interfaceClusterContainerStats- Returns:
- the maximum amount of free memory in bytes across the cluster JVMs.
-
getMemoryMax
@ManagedAttribute(description="The maximum amount of memory in local JVM will attempt to utilise in bytes", displayName="Local JVM max memory") public long getMemoryMax()- Specified by:
getMemoryMaxin interfaceClusterContainerStats- Returns:
- the maximum amount of memory that JVMs across the cluster will attempt to utilise in bytes.
-
getMemoryTotal
@ManagedAttribute(description="The total amount of memory in the local JVM in bytes", displayName="Local total memory") public long getMemoryTotal()- Specified by:
getMemoryTotalin interfaceClusterContainerStats- Returns:
- the total amount of memory in the JVMs across the cluster in bytes.
-
getMemoryUsed
@ManagedAttribute(description="The amount of memory used by the local JVM in bytes", displayName="Local memory utilisation") public long getMemoryUsed()- Specified by:
getMemoryUsedin interfaceClusterContainerStats- Returns:
- the amount of memory used by JVMs across the cluster in bytes.
-
getStaleStatsThreshold
long getStaleStatsThreshold()- Returns:
- The time in milliseconds, to wait between requests before re-retrieving cluster wide stats
-
setStaleStatsThreshold
void setStaleStatsThreshold(long threshold) - Parameters:
threshold- the time in milliseconds, to wait between requests before re-retrieving cluster wide stats
-
reset
void reset()Reset the collected statistics
-