Class MetricsManagementCenterConfig


  • public class MetricsManagementCenterConfig
    extends java.lang.Object
    Management Center related metrics configuration.
    Since:
    4.0
    • Field Detail

      • DEFAULT_METRICS_RETENTION_SECONDS

        public static final int DEFAULT_METRICS_RETENTION_SECONDS
        Default retention period for metrics.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MetricsManagementCenterConfig

        public MetricsManagementCenterConfig()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Returns whether metrics will be exposed to Hazelcast Management Center. If enabled, Hazelcast Management Center will be able to read out the collected metrics from this member. It's enabled by default.

        This configuration acts as a fine-tuning option beyond enabling/disabling the Metrics collection entirely via the BaseMetricsConfig.isEnabled() master switch.

        Returns:
        true if exposing to Hazelcast Management Center is enabled.
        See Also:
        BaseMetricsConfig.isEnabled()
      • setEnabled

        @Nonnull
        public MetricsManagementCenterConfig setEnabled​(boolean enabled)
        Enables exposing metrics to Hazelcast Management Center. If enabled, Hazelcast Management Center will be able to read out the recorded metrics from this member. It's enabled by default.

        This configuration acts as a fine-tuning option beyond enabling/disabling the Metrics collection entirely via the enabled master switch.

        May be overridden by ClusterProperty.METRICS_MC_ENABLED system property.

        See Also:
        setEnabled(boolean)
      • getRetentionSeconds

        public int getRetentionSeconds()
        Returns the number of seconds the metrics will be retained on the instance.
      • setRetentionSeconds

        @Nonnull
        public MetricsManagementCenterConfig setRetentionSeconds​(int retentionSeconds)
        Sets the number of seconds the metrics will be retained on the instance. By default, metrics are retained for 5 seconds (that is for one collection of metrics values, if default BaseMetricsConfig.setCollectionFrequencySeconds(int) interval seconds is used). More retention means more heap memory, but allows for longer client hiccups without losing a value (for example to restart the Management Center).

        May be overridden by ClusterProperty.METRICS_MC_RETENTION system property.

      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object