Record Class MazeService.OperationOutcome

java.lang.Object
java.lang.Record
dev.despical.mazeengine.service.MazeService.OperationOutcome
Enclosing class:
MazeService

public static record MazeService.OperationOutcome(String name, MazeService.OperationTicket ticket, MazeRecord record, Throwable error) extends Record
Carries the terminal record or failure delivered to the operation observer.

The ticket preserves operation identity and kind. A failed planning action can have no record, while an error after world work can retain a failed record. This notification is published before the ticket future completes.

  • Constructor Details

    • OperationOutcome

      public OperationOutcome(String name, MazeService.OperationTicket ticket, MazeRecord record, Throwable error)
      Creates an instance of a OperationOutcome record class.
      Parameters:
      name - the value for the name record component
      ticket - the value for the ticket record component
      record - the value for the record record component
      error - the value for the error record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • ticket

      public MazeService.OperationTicket ticket()
      Returns the value of the ticket record component.
      Returns:
      the value of the ticket record component
    • record

      public MazeRecord record()
      Returns the value of the record record component.
      Returns:
      the value of the record record component
    • error

      public Throwable error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component