Record Class MigrationResult.MigrationStep
java.lang.Object
java.lang.Record
net.blockhost.commons.config.migration.MigrationResult.MigrationStep
- Record Components:
fromVersion- the version before this steptoVersion- the version after this stepdescription- the description of what the migration didduration- how long this step took
- Enclosing interface:
MigrationResult
-
Constructor Summary
ConstructorsConstructorDescriptionMigrationStep(int fromVersion, int toVersion, String description, Duration duration) Creates an instance of aMigrationSteprecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.duration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.Creates a migration step from a migration and timing information.intReturns the value of thefromVersionrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intReturns the value of thetoVersionrecord component.
-
Constructor Details
-
MigrationStep
Creates an instance of aMigrationSteprecord class.- Parameters:
fromVersion- the value for thefromVersionrecord componenttoVersion- the value for thetoVersionrecord componentdescription- the value for thedescriptionrecord componentduration- the value for thedurationrecord component
-
-
Method Details
-
from
Creates a migration step from a migration and timing information.- Parameters:
migration- the migration that was appliedstart- the start timeend- the end time- Returns:
- a new migration step
-
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. -
fromVersion
public int fromVersion()Returns the value of thefromVersionrecord component.- Returns:
- the value of the
fromVersionrecord component
-
toVersion
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
duration
-