Record Class NuggetControl.Result

java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetControl.Result
Record Components:
operationId - server or caller operation id
correlationId - safe correlation id
action - requested action
mode - requested mode
admitted - whether PIN admission was accepted
authorized - whether authorization allowed the action
targetNuggetId - target nugget id
targetRuntimeId - target runtime id
targetGeneration - target runtime generation
previousState - state observed before evaluation
currentState - state observed while returning the result
resultingState - expected or observed resulting state
outcome - stable outcome enum
outcomeText - safe operator-facing text
accepted - whether the operation was accepted
inProgress - whether work remains in progress
completed - whether the operation completed synchronously
partial - whether optional details are partial
outcomeUnknown - whether the final state is uncertain
cleanupPartial - whether cleanup is known to be partial
confirmation - confirmation metadata, only for direct confirmation-required responses
warnings - safe warnings
error - normalized safe error, or null
requestedAt - request timestamp
completedAt - result timestamp
elapsed - elapsed server-side duration
metadata - safe bounded metadata
Enclosing class:
NuggetControl

public static record NuggetControl.Result(String operationId, String correlationId, NuggetControl.Action action, NuggetControl.Mode mode, boolean admitted, boolean authorized, String targetNuggetId, String targetRuntimeId, long targetGeneration, NuggetState previousState, NuggetState currentState, NuggetState resultingState, NuggetControl.Outcome outcome, String outcomeText, boolean accepted, boolean inProgress, boolean completed, boolean partial, boolean outcomeUnknown, boolean cleanupPartial, NuggetControl.Confirmation confirmation, List<String> warnings, RemoteError error, Instant requestedAt, Instant completedAt, Duration elapsed, Map<String,String> metadata) extends Record
Safe nugget-control result.

For accepted asynchronous controls, accepted() records that the server accepted responsibility for the operation, while outcome() records the latest known operation state. A retained timeout or unknown-outcome status may have outcomeUnknown() and cleanupPartial() set to true; clients must treat that as a truthful degraded status and must not infer that repeating the request will execute the operation again.

  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Specified by:
      toString in class Record
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • operationId

      public String operationId()
      Returns the value of the operationId record component.
      Returns:
      the value of the operationId record component
    • correlationId

      public String correlationId()
      Returns the value of the correlationId record component.
      Returns:
      the value of the correlationId record component
    • action

      public NuggetControl.Action action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • mode

      public NuggetControl.Mode mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • admitted

      public boolean admitted()
      Returns the value of the admitted record component.
      Returns:
      the value of the admitted record component
    • authorized

      public boolean authorized()
      Returns the value of the authorized record component.
      Returns:
      the value of the authorized record component
    • targetNuggetId

      public String targetNuggetId()
      Returns the value of the targetNuggetId record component.
      Returns:
      the value of the targetNuggetId record component
    • targetRuntimeId

      public String targetRuntimeId()
      Returns the value of the targetRuntimeId record component.
      Returns:
      the value of the targetRuntimeId record component
    • targetGeneration

      public long targetGeneration()
      Returns the value of the targetGeneration record component.
      Returns:
      the value of the targetGeneration record component
    • previousState

      public NuggetState previousState()
      Returns the value of the previousState record component.
      Returns:
      the value of the previousState record component
    • currentState

      public NuggetState currentState()
      Returns the value of the currentState record component.
      Returns:
      the value of the currentState record component
    • resultingState

      public NuggetState resultingState()
      Returns the value of the resultingState record component.
      Returns:
      the value of the resultingState record component
    • outcome

      public NuggetControl.Outcome outcome()
      Returns the value of the outcome record component.
      Returns:
      the value of the outcome record component
    • outcomeText

      public String outcomeText()
      Returns the value of the outcomeText record component.
      Returns:
      the value of the outcomeText record component
    • accepted

      public boolean accepted()
      Returns the value of the accepted record component.
      Returns:
      the value of the accepted record component
    • inProgress

      public boolean inProgress()
      Returns the value of the inProgress record component.
      Returns:
      the value of the inProgress record component
    • completed

      public boolean completed()
      Returns the value of the completed record component.
      Returns:
      the value of the completed record component
    • partial

      public boolean partial()
      Returns the value of the partial record component.
      Returns:
      the value of the partial record component
    • outcomeUnknown

      public boolean outcomeUnknown()
      Returns the value of the outcomeUnknown record component.
      Returns:
      the value of the outcomeUnknown record component
    • cleanupPartial

      public boolean cleanupPartial()
      Returns the value of the cleanupPartial record component.
      Returns:
      the value of the cleanupPartial record component
    • confirmation

      public NuggetControl.Confirmation confirmation()
      Returns the value of the confirmation record component.
      Returns:
      the value of the confirmation record component
    • warnings

      public List<String> warnings()
      Returns the value of the warnings record component.
      Returns:
      the value of the warnings record component
    • error

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

      public Instant requestedAt()
      Returns the value of the requestedAt record component.
      Returns:
      the value of the requestedAt record component
    • completedAt

      public Instant completedAt()
      Returns the value of the completedAt record component.
      Returns:
      the value of the completedAt record component
    • elapsed

      public Duration elapsed()
      Returns the value of the elapsed record component.
      Returns:
      the value of the elapsed record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component