A
- a representation of an action command that is shared across all actions in the saga. This is typically a generic type, such as Json, or if using Avro serialization, SpecificRecord or GenericRecordpublic class SagaAction<A> extends Object
Modifier and Type | Field and Description |
---|---|
ActionId |
actionId
The Action id uniquely identifies the action within the Saga dependency graph.
|
ActionCommand<A> |
command
The action command for regular processing of the action.
|
Set<ActionId> |
dependencies
The set dependencies of an action (i.e.
|
List<SagaError> |
error
A list of error may have occurred while processing an action.
|
int |
retryCount
Th number of times that processing of an action has been re-attempted.
|
ActionStatus |
status
The status of the action.
|
Optional<ActionCommand<A>> |
undoCommand
The command for processing of the action when in undo (compensation) mode.
|
Constructor and Description |
---|
SagaAction() |
Modifier and Type | Method and Description |
---|---|
SagaAction<A> |
updated(ActionStatus newStatus)
Returns an new
SagaAction with just the status updated |
public final ActionId actionId
public final ActionCommand<A> command
public final Optional<ActionCommand<A>> undoCommand
undoCommand
can be defined statically as part of the initial saga definition, and can be (re)defined
dynamically by the returning a new undo command from the action processor when processing in regular mode.
public final Set<ActionId> dependencies
public final ActionStatus status
public final List<SagaError> error
ActionStatus
is one of the failure status, this list will be populated with the errors that occurred.public final int retryCount
public SagaAction<A> updated(ActionStatus newStatus)
SagaAction
with just the status updatednewStatus
- the new statusCopyright © 2019. All rights reserved.