Package org.jgroups.blocks
Class TwoPhaseVotingAdapter.TwoPhaseVoteWrapper
- java.lang.Object
-
- org.jgroups.blocks.TwoPhaseVotingAdapter.TwoPhaseVoteWrapper
-
- All Implemented Interfaces:
VotingListener
- Enclosing class:
- TwoPhaseVotingAdapter
public static class TwoPhaseVotingAdapter.TwoPhaseVoteWrapper extends java.lang.Object implements VotingListener
-
-
Constructor Summary
Constructors Constructor Description TwoPhaseVoteWrapper(TwoPhaseVotingListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)inthashCode()booleanvote(java.lang.Object decree)Each member is able to vote withtrueorfalsemessages.
-
-
-
Constructor Detail
-
TwoPhaseVoteWrapper
public TwoPhaseVoteWrapper(TwoPhaseVotingListener listener)
-
-
Method Detail
-
vote
public boolean vote(java.lang.Object decree) throws VoteExceptionDescription copied from interface:VotingListenerEach member is able to vote withtrueorfalsemessages. If the member does not know what to do with thedecreeit should throwVoteException. Doing this he will be excluded from voting process and will not influence the result.- Specified by:
votein interfaceVotingListener- Parameters:
decree- object representing the decree of current voting.- Throws:
VoteException- if listener does not know the meaning of the decree and wants to be excluded from this voting.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
-