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 interface SagaAPI<A>
Modifier and Type | Method and Description |
---|---|
io.simplesource.data.FutureResult<SagaError,SagaResponse> |
getSagaResponse(SagaId sagaId,
java.time.Duration timeout)
Returns the result of the saga.
|
io.simplesource.data.FutureResult<SagaError,SagaId> |
submitSaga(SagaRequest<A> request)
Initiates a saga.
|
io.simplesource.data.FutureResult<SagaError,SagaId> submitSaga(SagaRequest<A> request)
This does not return the result of the saga, just an indication of whether the request was published successfully or not.
We call the getSagaResponse
method to asychronously return the result of the saga.
request
- the requestio.simplesource.data.FutureResult<SagaError,SagaResponse> getSagaResponse(SagaId sagaId, java.time.Duration timeout)
sagaId
- the saga id for the saga initiated by calling submitSaga
.timeout
- the timeoutCopyright © 2019. All rights reserved.