Package io.micronaut.crac
Class CracConfigurationProperties
java.lang.Object
io.micronaut.crac.CracConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,CracConfiguration
@ConfigurationProperties("crac")
public class CracConfigurationProperties
extends Object
implements CracConfiguration
Configuration for CRaC support. Enabled by default.
- Since:
- 1.0.0
- Author:
- Tim Yates
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull Duration
boolean
boolean
void
setDatasourcePauseTimeout
(Duration datasourcePauseTimeout) The timeout to wait for a datasource to pause before taking a checkpoint.void
setEnabled
(boolean enabled) Whether CRaC (Coordinated Restore at Checkpoint) support, even if we're on a supporting JDK, is enabled.void
setRefreshBeans
(boolean refreshBeans) Whether to trigger a refresh event to refresh allRefreshable
beans prior to taking a checkpoint.
-
Field Details
-
PREFIX
The prefix to use for CRaC configuration.- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_REFRESH
public static final boolean DEFAULT_REFRESH- See Also:
-
DEFAULT_DATASOURCE_PAUSE_TIMEOUT
- See Also:
-
-
Constructor Details
-
CracConfigurationProperties
public CracConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
- Returns:
- Whether CRaC is enabled.
-
setEnabled
public void setEnabled(boolean enabled) Whether CRaC (Coordinated Restore at Checkpoint) support, even if we're on a supporting JDK, is enabled. Default value (true).- Parameters:
enabled
- override CRaC if required
-
isRefreshBeans
public boolean isRefreshBeans()- Specified by:
isRefreshBeans
in interfaceCracConfiguration
- Returns:
- Whether to refresh beans prior to taking a checkpoint.
-
setRefreshBeans
public void setRefreshBeans(boolean refreshBeans) Whether to trigger a refresh event to refresh allRefreshable
beans prior to taking a checkpoint. Default value (true).- Parameters:
refreshBeans
- Whether to trigger a refresh event prior to taking a checkpoint.- See Also:
-
getDatasourcePauseTimeout
- Specified by:
getDatasourcePauseTimeout
in interfaceCracConfiguration
- Returns:
- The timeout to wait for a datasource to pause before taking a checkpoint.
-
setDatasourcePauseTimeout
The timeout to wait for a datasource to pause before taking a checkpoint. Default value ("PT30S").- Parameters:
datasourcePauseTimeout
- The timeout to wait for a datasource to pause before taking a checkpoint.
-