|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--universal.Message
This class is the superclass for all the kind of messages exchanges for the consensus and leader election purposes.
Field Summary | |
static int |
ACK_READ_MSG
|
static int |
ACK_WRITE_MSG
|
static int |
AM_ALIVE_MSG
|
int |
mid
|
int |
msgType
Define the type of the message. |
static int |
NACK_READ_MSG
|
static int |
NACK_WRITE_MSG
|
static int |
READ_MSG
|
int |
senderid
the pid of the replicated server that send this message |
static int |
WRITE_MSG
|
Constructor Summary | |
Message()
|
Method Summary | |
static universal.Message |
decode(byte[] byteArray)
When you want to decode a message whatever is its type you have to call the Decode function of this class which is going to first decode the common variable of all the messages and then to call the Decode function of his real type. |
byte[] |
encode()
When you want to encode a message, you should call the encode function of the real type of the message and not this one. |
int |
msgId()
|
int |
msgType()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int senderid
public int mid
public int msgType
public static final int ACK_READ_MSG
public static final int ACK_WRITE_MSG
public static final int AM_ALIVE_MSG
public static final int NACK_READ_MSG
public static final int NACK_WRITE_MSG
public static final int READ_MSG
public static final int WRITE_MSG
Constructor Detail |
public Message()
Method Detail |
public static universal.Message decode(byte[] byteArray)
public byte[] encode()
public int msgId()
public int msgType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |