Class HeartbeatConfiguration

java.lang.Object
io.micronaut.health.HeartbeatConfiguration
All Implemented Interfaces:
Toggleable

@ConfigurationProperties("micronaut.heartbeat") public class HeartbeatConfiguration extends Object implements Toggleable
Configuration for heart beat.
Since:
1.0
Author:
Graeme Rocher
  • Field Details

    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
    • DEFAULT_INTERVAL_SECONDS

      public static final int DEFAULT_INTERVAL_SECONDS
      The default interval seconds.
      See Also:
    • PREFIX

      public static final String PREFIX
      The prefix used for the heart beat configuration.
      See Also:
    • ENABLED

      public static final String ENABLED
      Whether the heartbeat is enabled.
      See Also:
  • Constructor Details

    • HeartbeatConfiguration

      public HeartbeatConfiguration()
  • Method Details

    • getInterval

      public Duration getInterval()
      Returns:
      The interval with which to publish HeartbeatEvent instances
    • setInterval

      public void setInterval(Duration interval)
      Default value (15 seconds).
      Parameters:
      interval - The interval to publish HeartbeatEvent instances
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface Toggleable
      Returns:
      Whether HeartbeatEvent event instances should be published by the server
    • setEnabled

      public void setEnabled(boolean enabled)
      Default value (true).
      Parameters:
      enabled - Enable the publish of HeartbeatEvent event instances