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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBaseMetricsConfig(BaseMetricsConfig metricsConfig) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the metrics collection frequency in seconds.booleanReturns 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_ENABLEDsystem property for the member.May be overridden by
ClientProperty.METRICS_ENABLEDandClientProperty.STATISTICS_ENABLEDsystem properties for the client.When both of them configured for the client
ClientProperty.STATISTICS_ENABLEDis 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_FREQUENCYsystem property for the member.May be overridden by
ClientProperty.METRICS_COLLECTION_FREQUENCYandClientProperty.STATISTICS_PERIOD_SECONDSsystem properties for the clientWhen both of them is configured for the client,
ClientProperty.STATISTICS_PERIOD_SECONDSis ignored. -
getCollectionFrequencySeconds
public int getCollectionFrequencySeconds()Returns the metrics collection frequency in seconds.
-