Record Class IcmpFailureDetectorConfig

java.lang.Object
java.lang.Record
com.loomcache.common.config.IcmpFailureDetectorConfig

public record IcmpFailureDetectorConfig(boolean enabled, long timeoutMs, long intervalMs, int maxAttempts, boolean failFastOnStartup) extends Record
Optional layer-3 reachability probe configuration for member failure detection.

The JDK reachability API uses ICMP when the runtime has permission and may fall back to TCP echo otherwise, so this config is opt-in by default.

  • Field Details

  • Constructor Details

    • IcmpFailureDetectorConfig

      public IcmpFailureDetectorConfig(boolean enabled, long timeoutMs, long intervalMs, int maxAttempts, boolean failFastOnStartup)
      Creates an instance of a IcmpFailureDetectorConfig record class.
      Parameters:
      enabled - the value for the enabled record component
      timeoutMs - the value for the timeoutMs record component
      intervalMs - the value for the intervalMs record component
      maxAttempts - the value for the maxAttempts record component
      failFastOnStartup - the value for the failFastOnStartup record component
  • Method Details

    • disabled

      public static IcmpFailureDetectorConfig disabled()
    • defaults

      public static IcmpFailureDetectorConfig defaults()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • timeoutMs

      public long timeoutMs()
      Returns the value of the timeoutMs record component.
      Returns:
      the value of the timeoutMs record component
    • intervalMs

      public long intervalMs()
      Returns the value of the intervalMs record component.
      Returns:
      the value of the intervalMs record component
    • maxAttempts

      public int maxAttempts()
      Returns the value of the maxAttempts record component.
      Returns:
      the value of the maxAttempts record component
    • failFastOnStartup

      public boolean failFastOnStartup()
      Returns the value of the failFastOnStartup record component.
      Returns:
      the value of the failFastOnStartup record component