Package org.infinispan.stats.impl
Class ClusterContainerStatsImpl
java.lang.Object
org.infinispan.stats.impl.AbstractClusterStats
org.infinispan.stats.impl.ClusterContainerStatsImpl
- All Implemented Interfaces:
JmxStatisticsExposer,ClusterContainerStats,ContainerStats
@MBean(objectName="ClusterContainerStats",
description="General container statistics aggregated across the cluster.")
public class ClusterContainerStatsImpl
extends AbstractClusterStats
implements ClusterContainerStats
- Since:
- 9.0
- Author:
- Ryan Emerson
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longprotected longprotected longFields inherited from interface org.infinispan.stats.ClusterContainerStats
OBJECT_NAMEFields inherited from interface org.infinispan.stats.ContainerStats
LONG_ATTRIBUTES, MEMORY_AVAILABLE, MEMORY_MAX, MEMORY_TOTAL, MEMORY_USED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglonglonglonglongprotected NumberbooleanReturns whether an interceptor's statistics are being captured.voidinit(EmbeddedCacheManager cacheManager, GlobalConfiguration configuration) voidreset()Reset the collected statisticsvoidreset()voidResets an interceptor's cache statisticsvoidsetStaleStatsThreshold(long threshold) voidsetStaleStatsThreshold(long staleStatsThreshold) voidsetStatisticsEnabled(boolean enabled) Enables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.voidstart()Methods inherited from class org.infinispan.stats.impl.AbstractClusterStats
getStaleStatsThreshold, getTimeSinceReset, isStatisticsEnabled
-
Field Details
-
DEFAULT_STALE_STATS_THRESHOLD
public static final long DEFAULT_STALE_STATS_THRESHOLD- See Also:
-
staleStatsThreshold
protected volatile long staleStatsThreshold -
statsUpdateTimestamp
protected volatile long statsUpdateTimestamp
-
-
Constructor Details
-
ClusterContainerStatsImpl
public ClusterContainerStatsImpl()
-
-
Method Details
-
init
-
start
public void start() -
getMemoryAvailable
@ManagedAttribute(description="The maximum amount of free memory in bytes across the cluster JVMs", displayName="Cluster wide available memory.", clusterWide=true) public long getMemoryAvailable()- Specified by:
getMemoryAvailablein interfaceContainerStats- Returns:
- the maximum amount of free memory in bytes across the cluster JVMs.
-
getMemoryMax
@ManagedAttribute(description="The maximum amount of memory that JVMs across the cluster will attempt to utilise in bytes", displayName="Cluster wide max memory of JVMs", clusterWide=true) public long getMemoryMax()- Specified by:
getMemoryMaxin interfaceContainerStats- 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 JVMs across the cluster in bytes", displayName="Cluster wide total memory", clusterWide=true) public long getMemoryTotal()- Specified by:
getMemoryTotalin interfaceContainerStats- Returns:
- the total amount of memory in the JVMs across the cluster in bytes.
-
getMemoryUsed
@ManagedAttribute(description="The amount of memory used by JVMs across the cluster in bytes", displayName="Cluster wide memory utilisation", clusterWide=true) public long getMemoryUsed()- Specified by:
getMemoryUsedin interfaceContainerStats- 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 -
reset
public void reset() -
resetStatistics
@ManagedOperation(description="Resets statistics gathered by this component", displayName="Reset statistics") public void resetStatistics()Description copied from interface:JmxStatisticsExposerResets an interceptor's cache statistics- Specified by:
resetStatisticsin interfaceJmxStatisticsExposer
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean enabled) Description copied from interface:JmxStatisticsExposerEnables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.- Specified by:
setStatisticsEnabledin interfaceJmxStatisticsExposer- Parameters:
enabled- true if statistics should be captured
-
getStatisticsEnabled
public boolean getStatisticsEnabled()Description copied from interface:JmxStatisticsExposerReturns whether an interceptor's statistics are being captured.- Specified by:
getStatisticsEnabledin interfaceJmxStatisticsExposer- Returns:
- true if statistics are captured
-
setStaleStatsThreshold
public void setStaleStatsThreshold(long staleStatsThreshold) -
getStat
-