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
Base class of configuration options specific to metrics collection.
- Since:
- 4.0
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
BaseMetricsConfig
(BaseMetricsConfig metricsConfig) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the metrics collection frequency in seconds.boolean
Returns if metrics collection is enabled.setCollectionFrequencySeconds
(int intervalSeconds) Sets the metrics collection frequency in seconds.setEnabled
(boolean enabled) Sets whether metrics collection should be enabled for the node.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 for the member.May be overridden by
ClientProperty.METRICS_ENABLED
andClientProperty.STATISTICS_ENABLED
system properties for the client.When both of them configured for the client
ClientProperty.STATISTICS_ENABLED
is ignored. -
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 for the member.May be overridden by
ClientProperty.METRICS_COLLECTION_FREQUENCY
andClientProperty.STATISTICS_PERIOD_SECONDS
system properties for the clientWhen both of them is configured for the client,
ClientProperty.STATISTICS_PERIOD_SECONDS
is ignored. -
getCollectionFrequencySeconds
public int getCollectionFrequencySeconds()Returns the metrics collection frequency in seconds.
-