Record Class PartitionDetector.PartitionEvent
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.PartitionDetector.PartitionEvent
- Record Components:
timestamp- system time when the event occurred (ms since epoch)eventType- type of event (DETECTED or HEALED)affectedNodes- set of nodes affected by the partitionduration- duration of the partition in milliseconds (0 if still ongoing)
- Enclosing class:
PartitionDetector
public static record PartitionDetector.PartitionEvent(long timestamp, PartitionDetector.PartitionEvent.EventType eventType, Set<String> affectedNodes, long duration)
extends Record
Event representing a partition change (detected or healed).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPartitionEvent(long timestamp, PartitionDetector.PartitionEvent.EventType eventType, Set<String> affectedNodes, long duration) Creates an instance of aPartitionEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaffectedNodesrecord component.longduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theeventTyperecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PartitionEvent
public PartitionEvent(long timestamp, PartitionDetector.PartitionEvent.EventType eventType, Set<String> affectedNodes, long duration) Creates an instance of aPartitionEventrecord class.- Parameters:
timestamp- the value for thetimestamprecord componenteventType- the value for theeventTyperecord componentaffectedNodes- the value for theaffectedNodesrecord componentduration- the value for thedurationrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timestamp
-
eventType
-
affectedNodes
Returns the value of theaffectedNodesrecord component.- Returns:
- the value of the
affectedNodesrecord component
-
duration
-