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 Details

  • Constructor Details

    • CracConfigurationProperties

      public CracConfigurationProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.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 interface CracConfiguration
      Returns:
      Whether to refresh beans prior to taking a checkpoint.
    • setRefreshBeans

      public void setRefreshBeans(boolean refreshBeans)
      Whether to trigger a refresh event to refresh all Refreshable 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

      @NonNull public @NonNull Duration getDatasourcePauseTimeout()
      Specified by:
      getDatasourcePauseTimeout in interface CracConfiguration
      Returns:
      The timeout to wait for a datasource to pause before taking a checkpoint.
    • setDatasourcePauseTimeout

      public void setDatasourcePauseTimeout(Duration datasourcePauseTimeout)
      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.