Package org.jgroups.blocks
Interface TwoPhaseVotingListener
-
- All Known Implementing Classes:
DistributedLockManager
public interface TwoPhaseVotingListenerImplementations of this interface can participate in two-phase voting process.- Author:
- Roman Rokytskyy (rrokytskyy@acm.org)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabort(java.lang.Object decree)This is unconditional abort of the previous voting on the decree.booleancommit(java.lang.Object decree)This is voting on the commiting the decree.booleanprepare(java.lang.Object decree)This is voting if the decree is acceptable to the party.
-
-
-
Method Detail
-
prepare
boolean prepare(java.lang.Object decree) throws VoteExceptionThis is voting if the decree is acceptable to the party.- Returns:
trueif the decree is acceptable.- Throws:
VoteException- if the decree type is unknown or listener does not want to vote on it.
-
commit
boolean commit(java.lang.Object decree) throws VoteExceptionThis is voting on the commiting the decree.- Returns:
trueis the decree is commited.- Throws:
VoteException- if the decree type is unknown or listener does not want to vote on it.
-
abort
void abort(java.lang.Object decree) throws VoteExceptionThis is unconditional abort of the previous voting on the decree.- Throws:
VoteException- if the listener ignores the abort.
-
-