01: package org.jgroups.blocks;
02:
03: /**
04: * Implemetations of this interface are able to participate in voting process.
05: *
06: * @author Roman Rokytskyy (rrokytskyy@acm.org)
07: */
08: public interface VotingListener {
09: /**
10: * Each member is able to vote with <code>true</code> or <code>false</code>
11: * messages. If the member does not know what to do with the
12: * <code>decree</code> it should throw <code>VoteException</code>. Doing
13: * this he will be excluded from voting process and will not influence
14: * the result.
15: *
16: * @param decree object representing the decree of current voting.
17: *
18: * @throws VoteException if listener does not know the meaning of the
19: * decree and wants to be excluded from this voting.
20: */
21: boolean vote(Object decree) throws VoteException;
22: }
|