|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.agreement.paxos.messages.PaxosMessage
public class PaxosMessage
Field Summary | |
---|---|
static java.lang.String |
COLLECT
Static type of a collect message |
static java.lang.String |
DECIDE
Static type of a decide message |
static java.lang.String |
FREEZE
Static type of a freeze message |
static java.lang.String |
FREEZEPROOF
Static type of a freeze-proof message |
private java.lang.String |
m_initiator
|
private java.lang.String |
m_messageType
|
private java.lang.String |
m_paxosInstanceIdentifier
|
private java.lang.String |
m_proposal
|
private int |
m_round
|
private java.lang.String |
m_sender
|
static java.lang.String |
PROPOSE
Static type of a propose message |
static java.lang.String |
REJECT
Static type of a reject message |
static java.lang.String |
STRONG
Static type of a strong accept message |
static java.lang.String |
WEAK
Static type of a weak accept message |
Constructor Summary | |
---|---|
PaxosMessage(java.lang.String a_messageType)
Creates a new PaxosMessage of the given type |
Method Summary | |
---|---|
boolean |
belongsTo(PaxosExecution a_execution)
Indicates if this message belongs to the given execution |
boolean |
belongsTo(PaxosInstance a_instance)
Indicates if this message belongs to the given paxos instance |
boolean |
belongsTo(PaxosRound a_round)
Indicates if this message belongs to the given round |
boolean |
equals(java.lang.Object ob)
|
java.lang.String |
getInitiator()
Returns the ID of the initiator of this messages execution |
java.lang.String |
getMessageType()
Returns the message type of this message |
java.lang.String |
getPaxosInstanceIdentifier()
Returns the round number of this message |
java.lang.String |
getProposal()
Returns the proposal of this execution |
int |
getRound()
|
java.lang.String |
getSender()
Returns the ID of the sender of this message |
void |
setInitiator(java.lang.String a_initiator)
Sets the initiator of the executions this message belongs to |
void |
setPaxosInstanceIdentifier(java.lang.String a_value)
|
void |
setProposal(java.lang.String a_proposal)
Sets the proposal of this message |
void |
setRound(int a_round)
|
void |
setSender(java.lang.String a_sender)
Sets the ID of the sender of this message |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String PROPOSE
public static java.lang.String WEAK
public static java.lang.String STRONG
public static java.lang.String DECIDE
public static java.lang.String FREEZE
public static java.lang.String REJECT
public static java.lang.String FREEZEPROOF
public static java.lang.String COLLECT
private java.lang.String m_messageType
private java.lang.String m_proposal
private java.lang.String m_paxosInstanceIdentifier
private java.lang.String m_initiator
private java.lang.String m_sender
private int m_round
Constructor Detail |
---|
public PaxosMessage(java.lang.String a_messageType)
a_messageType
- One of the message typesMethod Detail |
---|
public java.lang.String getMessageType()
public boolean equals(java.lang.Object ob)
equals
in class java.lang.Object
public int getRound()
public java.lang.String getInitiator()
public java.lang.String getProposal()
public java.lang.String getPaxosInstanceIdentifier()
public java.lang.String getSender()
public void setRound(int a_round)
public void setInitiator(java.lang.String a_initiator)
a_initiator
- The ID of the initiator of the executions this message belongs
topublic void setProposal(java.lang.String a_proposal)
a_proposal
- The proposal contained in this messagepublic void setPaxosInstanceIdentifier(java.lang.String a_value)
public void setSender(java.lang.String a_sender)
a_sender
- The ID of the sender of this messagepublic boolean belongsTo(PaxosInstance a_instance)
a_instance
- The instance to be tested
public boolean belongsTo(PaxosExecution a_execution)
a_execution
- The execution to be tested
public boolean belongsTo(PaxosRound a_round)
a_round
- The round to be tested
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |