Record Class NuggetControl.Result
java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetControl.Result
- Record Components:
operationId- server or caller operation idcorrelationId- safe correlation idaction- requested actionmode- requested modeadmitted- whether PIN admission was accepted- whether authorization allowed the actiontargetNuggetId- target nugget idtargetRuntimeId- target runtime idtargetGeneration- target runtime generationpreviousState- state observed before evaluationcurrentState- state observed while returning the resultresultingState- expected or observed resulting stateoutcome- stable outcome enumoutcomeText- safe operator-facing textaccepted- whether the operation was acceptedinProgress- whether work remains in progresscompleted- whether the operation completed synchronouslypartial- whether optional details are partialoutcomeUnknown- whether the final state is uncertaincleanupPartial- whether cleanup is known to be partialconfirmation- confirmation metadata, only for direct confirmation-required responseswarnings- safe warningserror- normalized safe error, ornullrequestedAt- request timestampcompletedAt- result timestampelapsed- elapsed server-side durationmetadata- 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 Summary
ConstructorsConstructorDescriptionResult(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) Creates immutable safe result metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepted()Returns the value of theacceptedrecord component.action()Returns the value of theactionrecord component.booleanadmitted()Returns the value of theadmittedrecord component.booleanReturns the value of theauthorizedrecord component.booleanReturns the value of thecleanupPartialrecord component.booleanReturns the value of thecompletedrecord component.Returns the value of thecompletedAtrecord component.Returns the value of theconfirmationrecord component.Returns the value of thecorrelationIdrecord component.Returns the value of thecurrentStaterecord component.elapsed()Returns the value of theelapsedrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinProgressrecord component.metadata()Returns the value of themetadatarecord component.mode()Returns the value of themoderecord component.Returns the value of theoperationIdrecord component.outcome()Returns the value of theoutcomerecord component.Returns the value of theoutcomeTextrecord component.booleanReturns the value of theoutcomeUnknownrecord component.booleanpartial()Returns the value of thepartialrecord component.Returns the value of thepreviousStaterecord component.Returns the value of therequestedAtrecord component.Returns the value of theresultingStaterecord component.longReturns the value of thetargetGenerationrecord component.Returns the value of thetargetNuggetIdrecord component.Returns the value of thetargetRuntimeIdrecord component.toString()warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
Result
public 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) Creates immutable safe result metadata.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
operationId
Returns the value of theoperationIdrecord component.- Returns:
- the value of the
operationIdrecord component
-
correlationId
Returns the value of thecorrelationIdrecord component.- Returns:
- the value of the
correlationIdrecord component
-
action
-
mode
-
admitted
-
authorized
public boolean authorized()Returns the value of theauthorizedrecord component.- Returns:
- the value of the
authorizedrecord component
-
targetNuggetId
Returns the value of thetargetNuggetIdrecord component.- Returns:
- the value of the
targetNuggetIdrecord component
-
targetRuntimeId
Returns the value of thetargetRuntimeIdrecord component.- Returns:
- the value of the
targetRuntimeIdrecord component
-
targetGeneration
public long targetGeneration()Returns the value of thetargetGenerationrecord component.- Returns:
- the value of the
targetGenerationrecord component
-
previousState
Returns the value of thepreviousStaterecord component.- Returns:
- the value of the
previousStaterecord component
-
currentState
Returns the value of thecurrentStaterecord component.- Returns:
- the value of the
currentStaterecord component
-
resultingState
Returns the value of theresultingStaterecord component.- Returns:
- the value of the
resultingStaterecord component
-
outcome
-
outcomeText
Returns the value of theoutcomeTextrecord component.- Returns:
- the value of the
outcomeTextrecord component
-
accepted
-
inProgress
public boolean inProgress()Returns the value of theinProgressrecord component.- Returns:
- the value of the
inProgressrecord component
-
completed
-
partial
-
outcomeUnknown
public boolean outcomeUnknown()Returns the value of theoutcomeUnknownrecord component.- Returns:
- the value of the
outcomeUnknownrecord component
-
cleanupPartial
public boolean cleanupPartial()Returns the value of thecleanupPartialrecord component.- Returns:
- the value of the
cleanupPartialrecord component
-
confirmation
Returns the value of theconfirmationrecord component.- Returns:
- the value of the
confirmationrecord component
-
warnings
-
error
-
requestedAt
Returns the value of therequestedAtrecord component.- Returns:
- the value of the
requestedAtrecord component
-
completedAt
Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-
elapsed
-
metadata
-