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 boolean
TRIGGER_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 messageint
getReg()
Get timestamp of leader change and synchronizationint
getType()
Get type of messagevoid
readExternal(java.io.ObjectInput in)
void
writeExternal(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:
writeExternal
in interfacejava.io.Externalizable
- Overrides:
writeExternal
in classSystemMessage
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in classSystemMessage
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-