Record Class OperationResult
java.lang.Object
java.lang.Record
dev.despical.mazeengine.api.operation.OperationResult
- Record Components:
operationId- the unique UUID of the completed operationkind- the action that completedmaze- the final immutable maze descriptioncompletedAt- the timestamp at which this result was created
public record OperationResult(UUID operationId, OperationKind kind, MazeSnapshot maze, Instant completedAt)
extends Record
Describes the successful final outcome of one world-editing operation.
The result is published after world work and final metadata persistence or deletion have finished and the reservation has been released. Failed and cancelled operations do not produce this result; their stages complete exceptionally and their failure events carry the underlying cause.
The maze description is immutable. For removal, it carries
MazeSnapshot.Status.DELETED even though the record is now absent from
the registry. Retaining this result does not make it update with future work.
-
Constructor Summary
ConstructorsConstructorDescriptionOperationResult(UUID operationId, OperationKind kind, MazeSnapshot maze, Instant completedAt) Creates an instance of aOperationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompletedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.maze()Returns the value of themazerecord component.Returns the value of theoperationIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OperationResult
public OperationResult(UUID operationId, OperationKind kind, MazeSnapshot maze, Instant completedAt) Creates an instance of aOperationResultrecord class.- Parameters:
operationId- the value for theoperationIdrecord componentkind- the value for thekindrecord componentmaze- the value for themazerecord componentcompletedAt- the value for thecompletedAtrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
operationId
Returns the value of theoperationIdrecord component.- Returns:
- the value of the
operationIdrecord component
-
kind
-
maze
-
completedAt
Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-