Package bftsmart.tom.leaderchange
Class LCMessage
- java.lang.Object
-
- bftsmart.communication.SystemMessage
-
- bftsmart.tom.leaderchange.LCMessage
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
public class LCMessage extends SystemMessage
Message used during leader change and synchronization- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description booleanTRIGGER_LC_LOCALLY-
Fields inherited from class bftsmart.communication.SystemMessage
authenticated, sender
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getPayload()Obter data of the messageintgetReg()Get timestamp of leader change and synchronizationintgetType()Get type of messagevoidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class bftsmart.communication.SystemMessage
getSender
-
-
-
-
Constructor Detail
-
LCMessage
public LCMessage()
Empty constructor
-
LCMessage
public LCMessage(int from, int type, int ts, byte[] payload)Constructor- Parameters:
from- replica that creates this messagetype- type of the message (STOP, SYNC, CATCH-UP)ts- timestamp of leader change and synchronizationpayload- dada that comes with the message
-
-
Method Detail
-
getType
public int getType()
Get type of message- Returns:
- type of message
-
getReg
public int getReg()
Get timestamp of leader change and synchronization- Returns:
- timestamp of leader change and synchronization
-
getPayload
public byte[] getPayload()
Obter data of the message- Returns:
- data of the message
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classSystemMessage- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classSystemMessage- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-