Class GlobalMemoryMonitorConfigurationBuilder

java.lang.Object
org.infinispan.configuration.global.AbstractGlobalConfigurationBuilder
org.infinispan.configuration.global.GlobalMemoryMonitorConfigurationBuilder
All Implemented Interfaces:
Builder<GlobalMemoryMonitorConfiguration>, GlobalConfigurationChildBuilder

public class GlobalMemoryMonitorConfigurationBuilder extends AbstractGlobalConfigurationBuilder implements Builder<GlobalMemoryMonitorConfiguration>
Since:
16.2
  • Method Details

    • attributes

      public AttributeSet attributes()
      Specified by:
      attributes in interface Builder<GlobalMemoryMonitorConfiguration>
    • enabled

      public GlobalMemoryMonitorConfigurationBuilder enabled(boolean enabled)
      Enables or disables the memory monitor. When disabled, no JMX listeners are registered and no alerts are raised. Default is true.
      Parameters:
      enabled - whether the memory monitor is enabled
    • memoryThreshold

      public GlobalMemoryMonitorConfigurationBuilder memoryThreshold(double memoryThreshold)
      Sets the fraction of old generation heap usage that triggers a low memory alert. Must be between 0 (exclusive) and 1.0 (inclusive). Default is 0.85.
      Parameters:
      memoryThreshold - the memory threshold as a fraction
    • gcDurationThreshold

      public GlobalMemoryMonitorConfigurationBuilder gcDurationThreshold(long gcDurationThreshold)
      Sets the GC pause duration in milliseconds that triggers a GC duration alert. A single GC pause exceeding this value will raise the alert. Default is 5000.
      Parameters:
      gcDurationThreshold - the GC duration threshold in milliseconds
    • gcPressureThreshold

      public GlobalMemoryMonitorConfigurationBuilder gcPressureThreshold(double gcPressureThreshold)
      Sets the fraction of time spent in GC over the pressure window that triggers a GC pressure alert. Must be between 0 (exclusive) and 1.0 (inclusive). Default is 0.20.
      Parameters:
      gcPressureThreshold - the GC pressure threshold as a fraction
    • gcPressureWindow

      public GlobalMemoryMonitorConfigurationBuilder gcPressureWindow(long gcPressureWindow)
      Sets the rolling time window in milliseconds over which GC pressure is calculated. Must be positive. Default is 60000.
      Parameters:
      gcPressureWindow - the GC pressure window in milliseconds
    • create

      Description copied from interface: Builder
      Create the configuration bean
      Specified by:
      create in interface Builder<GlobalMemoryMonitorConfiguration>
      Returns:
    • read

      Description copied from interface: Builder
      Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration
      Specified by:
      read in interface Builder<GlobalMemoryMonitorConfiguration>
      Parameters:
      template - the configuration from which to "clone" this config if needed.
      combine - the way attributes and children of this instance and the template should be combined.
    • toString

      public String toString()
      Overrides:
      toString in class Object