Package com.hazelcast.config
Class BaseMetricsConfig<T extends BaseMetricsConfig>
java.lang.Object
com.hazelcast.config.BaseMetricsConfig<T>
- Type Parameters:
T
- The type of the concrete configuration class extending this base class.
- Direct Known Subclasses:
ClientMetricsConfig
,MetricsConfig
public abstract class BaseMetricsConfig<T extends BaseMetricsConfig> extends Object
Base class of configuration options specific to metrics collection.
- Since:
- 4.0
-
Field Summary
Fields Modifier and Type Field Description protected int
collectionFrequencySeconds
protected boolean
enabled
protected MetricsJmxConfig
jmxConfig
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseMetricsConfig()
protected
BaseMetricsConfig(BaseMetricsConfig metricsConfig)
-
Method Summary
Modifier and Type Method Description int
getCollectionFrequencySeconds()
Returns the metrics collection frequency in seconds.MetricsJmxConfig
getJmxConfig()
boolean
isEnabled()
Returns if metrics collection is enabled.T
setCollectionFrequencySeconds(int intervalSeconds)
Sets the metrics collection frequency in seconds.T
setEnabled(boolean enabled)
Sets whether metrics collection should be enabled for the node.T
setJmxConfig(MetricsJmxConfig jmxConfig)
-
Field Details
-
enabled
protected boolean enabled -
jmxConfig
-
collectionFrequencySeconds
protected int collectionFrequencySeconds
-
-
Constructor Details
-
BaseMetricsConfig
protected BaseMetricsConfig() -
BaseMetricsConfig
-
-
Method Details
-
setEnabled
Sets whether metrics collection should be enabled for the node. If enabled, Hazelcast Management Center will be able to connect to this member. It's enabled by default.May be overridden by
ClusterProperty.METRICS_ENABLED
system property. -
isEnabled
public boolean isEnabled()Returns if metrics collection is enabled. -
setJmxConfig
-
getJmxConfig
-
setCollectionFrequencySeconds
Sets the metrics collection frequency in seconds. The same interval is used for collection for Management Center and for JMX publisher. By default, metrics are collected every 5 seconds.May be overridden by
ClusterProperty.METRICS_COLLECTION_FREQUENCY
system property. -
getCollectionFrequencySeconds
public int getCollectionFrequencySeconds()Returns the metrics collection frequency in seconds.
-