Class MachineProperties.Guarder

java.lang.Object
me.ahoo.cosid.spring.boot.starter.machine.MachineProperties.Guarder
Enclosing class:
MachineProperties

public static class MachineProperties.Guarder extends Object
Configuration for machine ID guarding mechanisms.

The guarder monitors machine ID health and prevents conflicts by periodically validating that the assigned machine ID is still valid. If a conflict is detected, the application can take corrective action.

  • Constructor Details

    • Guarder

      public Guarder()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Checks if machine ID guarding is enabled.
      Returns:
      true if enabled, false otherwise
    • setEnabled

      public MachineProperties.Guarder setEnabled(boolean enabled)
      Sets whether machine ID guarding should be enabled.
      Parameters:
      enabled - true to enable guarding, false to disable
      Returns:
      this guarder configuration for method chaining
    • getInitialDelay

      public Duration getInitialDelay()
      Gets the initial delay before starting guarding.
      Returns:
      the initial delay duration
    • setInitialDelay

      public MachineProperties.Guarder setInitialDelay(Duration initialDelay)
      Sets the initial delay before starting guarding.
      Parameters:
      initialDelay - the initial delay duration to set
      Returns:
      this guarder configuration for method chaining
    • getDelay

      public Duration getDelay()
      Gets the delay between guarding checks.
      Returns:
      the delay duration
    • setDelay

      public MachineProperties.Guarder setDelay(Duration delay)
      Sets the delay between guarding checks.
      Parameters:
      delay - the delay duration to set
      Returns:
      this guarder configuration for method chaining
    • getSafeGuardDuration

      public Duration getSafeGuardDuration()
      Gets the safe guard duration.
      Returns:
      the safe guard duration
    • setSafeGuardDuration

      public MachineProperties.Guarder setSafeGuardDuration(Duration safeGuardDuration)
      Sets the safe guard duration.
      Parameters:
      safeGuardDuration - the safe guard duration to set
      Returns:
      this guarder configuration for method chaining