org.jgroups.blocks
public class TwoPhaseVotingAdapter extends Object
Version: $Id: TwoPhaseVotingAdapter.java,v 1.4 2005/06/08 15:56:54 publicnmi Exp $
| Nested Class Summary | |
|---|---|
| static class | TwoPhaseVotingAdapter.TwoPhaseVoteWrapper |
| static class | TwoPhaseVotingAdapter.TwoPhaseWrapper
Wrapper of the decree to voting decree. |
| Constructor Summary | |
|---|---|
| TwoPhaseVotingAdapter(VotingAdapter voteChannel)
Creats an instance of the class. | |
| Method Summary | |
|---|---|
| void | addListener(TwoPhaseVotingListener listener)
Wraps actual listener with the VoteChannelListener and adds to the
voteChannel |
| VotingAdapter | getVoteChannel() |
| void | removeListener(TwoPhaseVotingListener listener)
Removes the listener from the voteChannel |
| boolean | vote(Object decree, long timeout)
Performs the two-phase voting on the decree. |
| boolean | vote(Object decree, long timeout, VoteResponseProcessor voteResponseProcessor)
Performs the two-phase voting on the decree. |
Parameters: voteChannel the channel that will be used for voting.
Returns: Returns the voteChannel.