public class PaxosMessage extends SystemMessage
authenticated, sender
Constructor and Description |
---|
PaxosMessage()
Creates a paxos message.
|
PaxosMessage(int paxosType,
int id,
int round,
int from)
Creates a paxos message.
|
PaxosMessage(int paxosType,
int id,
int round,
int from,
byte[] value)
Creates a paxos message.
|
Modifier and Type | Method and Description |
---|---|
int |
getNumber()
Returns the consensus execution ID of this message
|
int |
getPaxosType()
Returns this message type
|
java.lang.String |
getPaxosVerboseType()
Returns this message type as a verbose string
|
java.lang.Object |
getProof()
Returns the proof associated with a PROPOSE or COLLECT message
|
int |
getRound()
Retrieves the round number to which this message belongs
|
byte[] |
getValue()
Retrieves the value contained in the message.
|
void |
readExternal(java.io.ObjectInput in) |
void |
setProof(java.lang.Object proof) |
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out) |
getSender
public PaxosMessage()
public PaxosMessage(int paxosType, int id, int round, int from, byte[] value)
paxosType
- This should be MessageFactory.COLLECT or MessageFactory.PROPOSEid
- Consensus's execution IDround
- Round numberfrom
- This should be this process IDvalue
- This should be null if its a COLLECT message, or the proposed value if it is a PROPOSE messagepublic PaxosMessage(int paxosType, int id, int round, int from)
paxosType
- This should be MessageFactory.FREEZEid
- Consensus's execution IDround
- Round numberfrom
- This should be this process IDpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class SystemMessage
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class SystemMessage
java.io.IOException
java.lang.ClassNotFoundException
public int getRound()
public byte[] getValue()
public void setProof(java.lang.Object proof)
public java.lang.Object getProof()
public int getNumber()
public int getPaxosType()
public java.lang.String getPaxosVerboseType()
public java.lang.String toString()
toString
in class java.lang.Object