|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.agreement.paxos.PaxosObject infoservice.agreement.paxos.PaxosCommunicator infoservice.agreement.paxos.PaxosProposer infoservice.agreement.paxos.PaxosAcceptor
public abstract class PaxosAcceptor
Field Summary | |
---|---|
protected java.util.Hashtable |
m_paxosInstances
A collection of all running PAXOS instances |
Fields inherited from class infoservice.agreement.paxos.PaxosProposer |
---|
m_lastRandom |
Fields inherited from class infoservice.agreement.paxos.PaxosCommunicator |
---|
m_targets |
Constructor Summary | |
---|---|
PaxosAcceptor()
|
Method Summary | |
---|---|
private void |
addCollectMessage(PaxosMessage a_msg)
Adds a CollectMessage. |
private void |
addDecideMessage(PaxosMessage a_msg)
Adds a DecideMessage. |
private void |
addFreezeMessage(PaxosMessage a_msg)
Adds a FreezeMessage. |
private void |
addFreezeProofMessage(PaxosMessage a_msg)
Adds a FreezeProofMessage. |
void |
addMessage(PaxosMessage a_msg)
This gets called if a PaxosMessage arrives. |
private void |
addProposeMessage(PaxosMessage a_msg)
Adds a ProposeMessage. |
private void |
addStrongMessage(PaxosMessage a_msg)
Adds a StrongMessage. |
private void |
addWeakMessage(PaxosMessage a_msg)
Adds a WeakMessage. |
private void |
cloneMessage(PaxosMessage a_original,
PaxosMessage a_target)
Copies the attributes of the source message to the target message |
private void |
decide(PaxosRound a_round,
PaxosMessage a_msg,
boolean a_sendDecide)
Decide for the proposal contained in the given message and send a DecideMessage to all processes if a_sendDecide is true |
private void |
freeze(PaxosRound a_round)
Freezes the given round either if a timeout oocured or if we got more than f FreezeMessages |
PaxosInstance |
getPaxosInstance(java.lang.String a_paxosInstanceId)
Returns the PaxosInstance identified by the given id |
private PaxosRound |
getPaxosRound(PaxosMessage a_msg)
Returns the PaxosRound to which the given message belongs |
protected java.util.Vector |
getRoundLeaders()
|
protected abstract void |
notifyAgreement(java.util.Hashtable a_agreements)
Callback for implementing classes. |
private void |
strongAccept(PaxosRound a_round,
PaxosMessage a_msg)
Strongly accept the proposal contained in the given message an send a StrongMessage to all processes |
void |
timeout(java.lang.Object m_round)
Callback method for the PaxosTimeout of a PaxosRound. |
private void |
weakAccept(PaxosRound a_round,
PaxosMessage a_msg)
Weakly accept the proposal contained in the given message and send a WeakMessage to all processes |
Methods inherited from class infoservice.agreement.paxos.PaxosProposer |
---|
propose, setRound |
Methods inherited from class infoservice.agreement.paxos.PaxosCommunicator |
---|
getF, getIdentifier, getN, getQuorumDecideStrong, getQuorumDecideWeak, getQuorumStrong, getQuorumTwoThird, getTargets, multicast, sendMessage, sendMessage, setTargets |
Methods inherited from class infoservice.agreement.paxos.PaxosObject |
---|
debug, error, fatal, getLog, info, setLog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable m_paxosInstances
Constructor Detail |
---|
public PaxosAcceptor()
Method Detail |
---|
public void addMessage(PaxosMessage a_msg)
a_msg
- The message to be handledprivate void addCollectMessage(PaxosMessage a_msg)
a_msg
- The CollectMessage to be handledprivate void addFreezeProofMessage(PaxosMessage a_msg)
a_msg
- The FreezeProofMessage to be handledprivate void addFreezeMessage(PaxosMessage a_msg)
a_msg
- The FreezeMessage to addprivate void addProposeMessage(PaxosMessage a_msg)
a_msg
- private void addWeakMessage(PaxosMessage a_msg)
a_msg
- The WeakMessage to be addedprivate void addStrongMessage(PaxosMessage a_msg)
a_msg
- The StrongMessage to be addedprivate void addDecideMessage(PaxosMessage a_msg)
a_msg
- The DecideMessage to be addedprivate void weakAccept(PaxosRound a_round, PaxosMessage a_msg)
a_round
- The round the message belongs toa_msg
- The message which triggered the weak acceptanceprivate void cloneMessage(PaxosMessage a_original, PaxosMessage a_target)
a_original
- The source messagea_target
- The target messageprivate void strongAccept(PaxosRound a_round, PaxosMessage a_msg)
a_round
- The round the message belongs toa_msg
- The message which triggered the weak acceptanceprivate void decide(PaxosRound a_round, PaxosMessage a_msg, boolean a_sendDecide)
a_round
- The round the message belongs toa_msg
- The message which triggered the weak acceptancea_sendDecide
- If true a decide message is sent, otherwise notprivate void freeze(PaxosRound a_round)
a_round
- The round to be frozenpublic void timeout(java.lang.Object m_round)
timeout
in interface TimeoutListener
m_round
- public PaxosInstance getPaxosInstance(java.lang.String a_paxosInstanceId)
a_paxosInstanceId
- The ID of the instance to be returned
private PaxosRound getPaxosRound(PaxosMessage a_msg)
a_msg
- The message used to determine the Round to be returned
protected java.util.Vector getRoundLeaders()
protected abstract void notifyAgreement(java.util.Hashtable a_agreements)
a_agreements
- Map of execution-identifier to decission
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |