universal
Class AckWriteMessage
java.lang.Object
|
+--universal.Message
|
+--universal.WriteMessage
|
+--universal.AckWriteMessage
- All Implemented Interfaces:
- java.io.Serializable
- public class AckWriteMessage
- extends universal.WriteMessage
Used for creating an AckWriteMessage.
An AckWriteMessage is sent during the consensus by all the replicated server
to the leader to acknowledge the WriteMessage that the leader has sent.
- See Also:
- Serialized Form
Field Summary |
boolean |
permission
the variable permission is not useful in a case of the crashStop model but could be used in the crashRecovery. |
Fields inherited from class universal.WriteMessage |
batchno, Kpj, roundno, value |
Constructor Summary |
AckWriteMessage(int batchno,
int roundno,
boolean permission)
To create an AckWriteMessage |
Method Summary |
static universal.WriteMessage |
decode(java.io.DataInputStream dis)
If you want to decode an AckWriteMessage, you should call the method Decode of
the superclass Message, not this one. |
byte[] |
encode()
If you want to encode a WriteMessage, you should call this method not the one from the
superclass. |
boolean |
equals(java.lang.Object obj)
Compares two objects for equality. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
permission
public boolean permission
- the variable permission is not useful in a case of the crashStop model but could be used in the crashRecovery.
AckWriteMessage
public AckWriteMessage(int batchno,
int roundno,
boolean permission)
- To create an AckWriteMessage
- Parameters:
batchno
- the place in the total order for which the consensus is actually maderoundno
- the round number for this consensuspermission
- not use in the crashStopModel
decode
public static universal.WriteMessage decode(java.io.DataInputStream dis)
- If you want to decode an AckWriteMessage, you should call the method Decode of
the superclass Message, not this one.
- Returns:
- an AckWriteMessage but as a type of WriteMessage(superclass)
encode
public byte[] encode()
- If you want to encode a WriteMessage, you should call this method not the one from the
superclass.
- Overrides:
encode
in class universal.WriteMessage
- Returns:
- an array of byte which contains all the information of this AckWriteMessage
equals
public boolean equals(java.lang.Object obj)
- Compares two objects for equality. Returns a boolean that indicates
whether this object is equivalent to the specified object. This method
is used when an object is stored in a hashtable.
- Overrides:
equals
in class universal.WriteMessage
- Parameters:
obj
- the Object to compare with
- Returns:
- true if these Objects are equal; false otherwise.
- See Also:
Hashtable
toString
public java.lang.String toString()
- Overrides:
toString
in class universal.WriteMessage