| java.lang.Object org.jgroups.blocks.TwoPhaseVotingAdapter
TwoPhaseVotingAdapter | public class TwoPhaseVotingAdapter (Code) | | This adapter introduces simple two-phase voting on a specified decree. All
nodes in the group receive a decree in "prepare" phase where they expres
their opinion on the decree. If all nodes voted positively on decree, next
phase "commit" fixes changes that were made in "prepare" phase, otherwise
changes are canceled in "abort" phase.
author: Roman Rokytskyy (rrokytskyy@acm.org) author: Robert Schaffar-Taurok (robert@fusion.at) version: $Id: TwoPhaseVotingAdapter.java,v 1.4 2005/06/08 15:56:54 publicnmi Exp $ |
Inner Class :public static class TwoPhaseVoteWrapper implements VotingListener | |
TwoPhaseVotingAdapter | public TwoPhaseVotingAdapter(VotingAdapter voteChannel)(Code) | | Creats an instance of the class.
Parameters: voteChannel - the channel that will be used for voting. |
addListener | public void addListener(TwoPhaseVotingListener listener)(Code) | | Wraps actual listener with the VoteChannelListener and adds to the
voteChannel
|
vote | public boolean vote(Object decree, long timeout) throws ChannelException(Code) | | Performs the two-phase voting on the decree. After the voting each
group member remains in the same state as others.
|
|
|