|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfoservice.agreement.paxos.PaxosObject
infoservice.agreement.paxos.PaxosCommunicator
public abstract class PaxosCommunicator
| Field Summary | |
|---|---|
protected java.util.Hashtable |
m_targets
|
| Constructor Summary | |
|---|---|
PaxosCommunicator()
|
|
| Method Summary | |
|---|---|
protected int |
getF()
Returns f, the number of maximum tolerable faulty processes |
protected abstract java.lang.String |
getIdentifier()
Returns the unique identifier for this PaxosCommunicator |
int |
getN()
Returns n, the number of all known processes |
protected int |
getQuorumDecideStrong()
Returns the quorum needed to decide if a proposal has been strong-accepted (2f) |
protected int |
getQuorumDecideWeak()
Gets the quorum needed to fast decide (n+3f)/2 |
protected int |
getQuorumStrong()
Returns the quorum needed to strong-accept a value: (n+f)/2 |
int |
getQuorumTwoThird()
|
java.util.Hashtable |
getTargets()
Returns the Hashtable of all known targets |
void |
multicast(PaxosMessage a_msg)
Multicasts the given message to all known IPaxosTargets. |
private int |
nextLower(double a_roof)
Returns the next lower integer for the given double |
private int |
nextUpper(double a_bottom)
Returns the next larger integer to the given double |
abstract void |
sendMessage(PaxosMessage a_msg,
IPaxosTarget a_target)
Sends the given message to the given target. |
void |
sendMessage(java.lang.String a_id,
PaxosMessage a_msg)
Sends the given message to the IPaxosTarget with the given ID |
void |
setTargets(java.util.Hashtable a_targets)
Sets the targets, i.e. |
| 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_targets
| Constructor Detail |
|---|
public PaxosCommunicator()
| Method Detail |
|---|
public void multicast(PaxosMessage a_msg)
sendMessage
a_msg - The message to multicast
public void sendMessage(java.lang.String a_id,
PaxosMessage a_msg)
a_id - The ID of the IPaxosTarget to which to senda_msg - The message to sendpublic java.util.Hashtable getTargets()
protected int getQuorumStrong()
protected int getQuorumDecideWeak()
protected int getQuorumDecideStrong()
protected int getF()
public int getN()
public int getQuorumTwoThird()
public void setTargets(java.util.Hashtable a_targets)
a_targets - A Vector containing IPaxosTargetsprivate int nextUpper(double a_bottom)
a_bottom -
private int nextLower(double a_roof)
a_roof - The double
public abstract void sendMessage(PaxosMessage a_msg,
IPaxosTarget a_target)
a_msg - a_target - protected abstract java.lang.String getIdentifier()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||