public interface Saga<T>
"orderId"
and value "1234"
.Modifier and Type | Method and Description |
---|---|
void |
execute(Consumer<T> invocation)
Execute the given
invocation against the root object of this Saga instance. |
AssociationValues |
getAssociationValues()
Returns a view on the Association Values for this saga instance.
|
String |
getSagaIdentifier()
Returns the unique identifier of this saga.
|
boolean |
handle(EventMessage<?> event)
Handle the given event.
|
<R> R |
invoke(Function<T,R> invocation)
Execute the given
invocation against the root object of this Saga instance. |
boolean |
isActive()
Indicates whether or not this saga is active.
|
TrackingToken |
trackingToken()
Returns the TrackingToken belonging to the EventMessage last processed by this instance, or
null if
this instance never handled an EventMessage, or if it received an EventMessage that doesn't carry a
TrackingToken. |
String getSagaIdentifier()
AssociationValues getAssociationValues()
<R> R invoke(Function<T,R> invocation)
invocation
against the root object of this Saga instance.R
- The type of return value expectedinvocation
- the function to invoke. The root object of the Saga is input to the function, the result is
the result of the execution.void execute(Consumer<T> invocation)
invocation
against the root object of this Saga instance.invocation
- the function to invoke. The root object of the Saga is input to the function.boolean handle(EventMessage<?> event)
event
- the event to handletrue
if the event was handled by the Saga, otherwise false
boolean isActive()
true
if this saga is active, false
otherwise.TrackingToken trackingToken()
null
if
this instance never handled an EventMessage, or if it received an EventMessage that doesn't carry a
TrackingToken.Copyright © 2010–2017. All rights reserved.