Record Class PartitionMigrationPipeline.MigrationTask
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.PartitionMigrationPipeline.MigrationTask
- Enclosing class:
PartitionMigrationPipeline
public static record PartitionMigrationPipeline.MigrationTask(int partitionId, String sourceNode, String targetNode, long dataSize, Instant startedAt, PartitionMigrationPipeline.MigrationState state)
extends Record
Task record representing a single partition migration.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionMigrationTask(int partitionId, String sourceNode, String targetNode, long dataSize, Instant startedAt, PartitionMigrationPipeline.MigrationState state) Creates an instance of aMigrationTaskrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongdataSize()Returns the value of thedataSizerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepartitionIdrecord component.Returns the value of thesourceNoderecord component.Returns the value of thestartedAtrecord component.state()Returns the value of thestaterecord component.Returns the value of thetargetNoderecord component.final StringtoString()Returns a string representation of this record class.withStartedAt(Instant instant)
-
Constructor Details
-
MigrationTask
public MigrationTask(int partitionId, String sourceNode, String targetNode, long dataSize, Instant startedAt, PartitionMigrationPipeline.MigrationState state) Creates an instance of aMigrationTaskrecord class.- Parameters:
partitionId- the value for thepartitionIdrecord componentsourceNode- the value for thesourceNoderecord componenttargetNode- the value for thetargetNoderecord componentdataSize- the value for thedataSizerecord componentstartedAt- the value for thestartedAtrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
withState
public PartitionMigrationPipeline.MigrationTask withState(PartitionMigrationPipeline.MigrationState newState) -
withStartedAt
-
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. -
partitionId
public int partitionId()Returns the value of thepartitionIdrecord component.- Returns:
- the value of the
partitionIdrecord component
-
sourceNode
Returns the value of thesourceNoderecord component.- Returns:
- the value of the
sourceNoderecord component
-
targetNode
Returns the value of thetargetNoderecord component.- Returns:
- the value of the
targetNoderecord component
-
dataSize
public long dataSize()Returns the value of thedataSizerecord component.- Returns:
- the value of the
dataSizerecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-