public class AsyncSagaProcessingEvent extends Object
Constructor and Description |
---|
AsyncSagaProcessingEvent() |
Modifier and Type | Method and Description |
---|---|
Set<AssociationValue> |
getAssociationValues()
Returns all association values that could potentially link a saga instance with the incoming event.
|
SagaMethodMessageHandler |
getCreationHandler()
Returns the event handler which is used to create a new saga instance based on the incoming event.
|
List<SagaMethodMessageHandler> |
getHandlers()
Returns the handler that can process the published Event.
|
AssociationValue |
getInitialAssociationValue()
Returns the association to assign to an event when handling an incoming event that creates a Saga.
|
AbstractAnnotatedSaga |
getNewSaga()
Returns the new Saga instance that should be used when processing an Event that creates a new Saga instance
|
EventMessage |
getPublishedEvent()
Returns the event that has been published on the EventBus.
|
Class<? extends Saga> |
getSagaType()
Returns the type of Saga being processed.
|
void |
reset(EventMessage nextEvent,
Class<? extends AbstractAnnotatedSaga> nextSagaType,
List<SagaMethodMessageHandler> nextHandlers,
AbstractAnnotatedSaga nextSagaInstance)
Reset this entry for processing a new EventMessage
|
boolean |
waitForSagaCreationVote(boolean didEventInvocation,
int processorCount,
boolean ownsNewSagaInstance)
Forces the current thread to wait for the voting to complete if it is responsible for creating the Saga.
|
public EventMessage getPublishedEvent()
public List<SagaMethodMessageHandler> getHandlers()
public Class<? extends Saga> getSagaType()
public boolean waitForSagaCreationVote(boolean didEventInvocation, int processorCount, boolean ownsNewSagaInstance)
didEventInvocation
- indicates whether the current processor found a Saga to processprocessorCount
- The total number of processors expected to cast a voteownsNewSagaInstance
- Indicates whether the current processor "owns" the to-be-created saga instance.true
if the current processor should create the new instance, false
otherwise.public AbstractAnnotatedSaga getNewSaga()
public void reset(EventMessage nextEvent, Class<? extends AbstractAnnotatedSaga> nextSagaType, List<SagaMethodMessageHandler> nextHandlers, AbstractAnnotatedSaga nextSagaInstance)
nextEvent
- The EventMessage to processnextSagaType
- The type of Saga to process this EventMessagenextHandlers
- The handlers potentially handling this messagenextSagaInstance
- The saga instance to use when a new saga is to be createdpublic SagaMethodMessageHandler getCreationHandler()
public AssociationValue getInitialAssociationValue()
null
.public Set<AssociationValue> getAssociationValues()
Copyright © 2010-2014. All Rights Reserved.