Record Class PartitionMove
java.lang.Object
java.lang.Record
com.loomcache.server.sharding.PartitionMove
- Record Components:
partitionId- the partition being moved (0 to numPartitions-1)fromGroup- the source Raft group IDtoGroup- the destination Raft group ID
Describes a single partition migration from one Raft group to another.
- Since:
- 2.0
-
Constructor Summary
ConstructorsConstructorDescriptionPartitionMove(int partitionId, int fromGroup, int toGroup) Compact constructor with validation. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefromGrouprecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thepartitionIdrecord component.inttoGroup()Returns the value of thetoGrouprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PartitionMove
public PartitionMove(int partitionId, int fromGroup, int toGroup) Compact constructor with validation.
-
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
partitionId
public int partitionId()Returns the value of thepartitionIdrecord component.- Returns:
- the value of the
partitionIdrecord component
-
fromGroup
-
toGroup
-