Record Class PartitionDetector.DetectorConfig
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.PartitionDetector.DetectorConfig
- Record Components:
phiThreshold- phi value threshold for suspecting a node (default: 8.0)heartbeatIntervalMs- expected interval between heartbeats in milliseconds and the minimum grace period before a tracked node can be suspectedwindowSize- sliding window size for inter-arrival times (default: 100)
- Enclosing class:
PartitionDetector
public static record PartitionDetector.DetectorConfig(double phiThreshold, long heartbeatIntervalMs, int windowSize)
extends Record
Configuration record for the partition detector.
-
Constructor Summary
ConstructorsConstructorDescriptionDetectorConfig(double phiThreshold, long heartbeatIntervalMs, int windowSize) Validate the configuration. -
Method Summary
Modifier and TypeMethodDescriptiondefaults()Create a configuration with default values. - phiThreshold: 8.0 - heartbeatIntervalMs: 1000 - windowSize: 100final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theheartbeatIntervalMsrecord component.doubleReturns the value of thephiThresholdrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thewindowSizerecord component.
-
Constructor Details
-
DetectorConfig
public DetectorConfig(double phiThreshold, long heartbeatIntervalMs, int windowSize) Validate the configuration.
-
-
Method Details
-
defaults
Create a configuration with default values. - phiThreshold: 8.0 - heartbeatIntervalMs: 1000 - windowSize: 100 -
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. -
phiThreshold
public double phiThreshold()Returns the value of thephiThresholdrecord component.- Returns:
- the value of the
phiThresholdrecord component
-
heartbeatIntervalMs
public long heartbeatIntervalMs()Returns the value of theheartbeatIntervalMsrecord component.- Returns:
- the value of the
heartbeatIntervalMsrecord component
-
windowSize
public int windowSize()Returns the value of thewindowSizerecord component.- Returns:
- the value of the
windowSizerecord component
-