@ConfigurationProperties(value="micronaut.heartbeat") public class HeartbeatConfiguration extends java.lang.Object implements Toggleable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static int |
DEFAULT_INTERVAL_SECONDS
The default interval seconds.
|
static java.lang.String |
ENABLED
Whether the heartbeat is enabled.
|
static java.lang.String |
PREFIX
The prefix used for the heart beat configuration.
|
Constructor and Description |
---|
HeartbeatConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
getInterval() |
boolean |
isEnabled() |
void |
setEnabled(boolean enabled)
Default value (true).
|
void |
setInterval(java.time.Duration interval)
Default value (15 seconds).
|
public static final boolean DEFAULT_ENABLED
public static final int DEFAULT_INTERVAL_SECONDS
public static final java.lang.String PREFIX
public static final java.lang.String ENABLED
public java.time.Duration getInterval()
HeartbeatEvent
instancespublic void setInterval(java.time.Duration interval)
interval
- The interval to publish HeartbeatEvent
instancespublic boolean isEnabled()
isEnabled
in interface Toggleable
HeartbeatEvent
event instances should be published by the serverpublic void setEnabled(boolean enabled)
enabled
- Enable the publish of HeartbeatEvent
event instances