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 Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final booleanstatic final longstatic final intstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionIcmpFailureDetectorConfig(boolean enabled, long timeoutMs, long intervalMs, int maxAttempts, boolean failFastOnStartup) Creates an instance of aIcmpFailureDetectorConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic IcmpFailureDetectorConfigdefaults()static IcmpFailureDetectorConfigdisabled()booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefailFastOnStartuprecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of theintervalMsrecord component.intReturns the value of themaxAttemptsrecord component.longReturns the value of thetimeoutMsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED- See Also:
-
DEFAULT_TIMEOUT_MS
public static final long DEFAULT_TIMEOUT_MS- See Also:
-
DEFAULT_INTERVAL_MS
public static final long DEFAULT_INTERVAL_MS- See Also:
-
DEFAULT_MAX_ATTEMPTS
public static final int DEFAULT_MAX_ATTEMPTS- See Also:
-
DEFAULT_FAIL_FAST_ON_STARTUP
public static final boolean DEFAULT_FAIL_FAST_ON_STARTUP- See Also:
-
-
Constructor Details
-
IcmpFailureDetectorConfig
public IcmpFailureDetectorConfig(boolean enabled, long timeoutMs, long intervalMs, int maxAttempts, boolean failFastOnStartup) Creates an instance of aIcmpFailureDetectorConfigrecord class.- Parameters:
enabled- the value for theenabledrecord componenttimeoutMs- the value for thetimeoutMsrecord componentintervalMs- the value for theintervalMsrecord componentmaxAttempts- the value for themaxAttemptsrecord componentfailFastOnStartup- the value for thefailFastOnStartuprecord component
-
-
Method Details
-
disabled
-
defaults
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
timeoutMs
public long timeoutMs()Returns the value of thetimeoutMsrecord component.- Returns:
- the value of the
timeoutMsrecord component
-
intervalMs
public long intervalMs()Returns the value of theintervalMsrecord component.- Returns:
- the value of the
intervalMsrecord component
-
maxAttempts
public int maxAttempts()Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-
failFastOnStartup
public boolean failFastOnStartup()Returns the value of thefailFastOnStartuprecord component.- Returns:
- the value of the
failFastOnStartuprecord component
-