Class DiskSpaceIndicatorConfiguration

  • All Implemented Interfaces:
    io.micronaut.core.util.Toggleable

    @ConfigurationProperties("endpoints.health.disk-space")
    public class DiskSpaceIndicatorConfiguration
    extends java.lang.Object
    implements io.micronaut.core.util.Toggleable

    Specific configuration properties for the disk space health indicator.

    Since:
    1.0
    • Field Detail

      • DEFAULT_ENABLED

        public static final boolean DEFAULT_ENABLED
        The default enable value.
        See Also:
        Constant Field Values
      • DEFAULT_PATH

        public static final java.lang.String DEFAULT_PATH
        The default path value.
        See Also:
        Constant Field Values
      • DEFAULT_THRESHOLD

        public static final long DEFAULT_THRESHOLD
        The default threshold value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DiskSpaceIndicatorConfiguration

        public DiskSpaceIndicatorConfiguration()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface io.micronaut.core.util.Toggleable
        Returns:
        Whether the health indicator is enabled
      • setEnabled

        protected void setEnabled​(boolean enabled)
        Default value (true).
        Parameters:
        enabled - Enable the health indication endpoint
      • getPath

        public java.io.File getPath()
        Returns:
        The file path to monitor for disk space
      • setPath

        protected void setPath​(java.io.File path)
        Default value (".").
        Parameters:
        path - The file path
      • getThreshold

        public long getThreshold()
        Returns:
        The threshold
      • setThreshold

        protected void setThreshold​(@ReadableBytes
                                    long threshold)
        Default value (10485760L => 10MB).
        Parameters:
        threshold - Set the threshold