public class AsyncSagaCreationElector extends Object
Constructor and Description |
---|
AsyncSagaCreationElector() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the voting counts for a new round.
|
boolean |
waitForSagaCreationVote(boolean didInvocation,
int totalVotesExpected,
boolean isSagaOwner)
Forces the current thread to wait for the voting to complete if it is responsible for creating the Saga.
|
public boolean waitForSagaCreationVote(boolean didInvocation, int totalVotesExpected, boolean isSagaOwner)
didInvocation
- indicates whether the current processor found a Saga to processtotalVotesExpected
- The total number of processors expected to cast a voteisSagaOwner
- 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 void clear()
Copyright © 2010-2014. All Rights Reserved.