Package bftsmart.statemanagement
Class SMMessage
- java.lang.Object
-
- bftsmart.communication.SystemMessage
-
- bftsmart.statemanagement.SMMessage
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
- Direct Known Subclasses:
CSTSMMessage,StandardSMMessage
public abstract class SMMessage extends SystemMessage
This class represents a message used in the state transfer protocol- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description booleanTRIGGER_SM_LOCALLY-
Fields inherited from class bftsmart.communication.SystemMessage
authenticated, sender
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSMMessage()protectedSMMessage(int sender, int cid, int type, ApplicationState state, View view, int regency, int leader)Constructs a SMMessage
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCID()Retrieves the consensus ID up to which the sender needs to be updatedintgetLeader()Retrieves the leader that the replica had when sending the stateintgetRegency()Retrieves the regency that the replica had when sending the stateApplicationStategetState()Retrieves the state logintgetType()Retrieves the type of the messageViewgetView()Retrieves the state logvoidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class bftsmart.communication.SystemMessage
getSender
-
-
-
-
Constructor Detail
-
SMMessage
protected SMMessage(int sender, int cid, int type, ApplicationState state, View view, int regency, int leader)Constructs a SMMessage- Parameters:
sender- Process Id of the sendercid- Consensus ID up to which the sender needs to be updatedtype- Message typereplica- Replica that should send the statestate- State log
-
SMMessage
protected SMMessage()
-
-
Method Detail
-
getState
public ApplicationState getState()
Retrieves the state log- Returns:
- The state Log
-
getView
public View getView()
Retrieves the state log- Returns:
- The state Log
-
getType
public int getType()
Retrieves the type of the message- Returns:
- The type of the message
-
getCID
public int getCID()
Retrieves the consensus ID up to which the sender needs to be updated- Returns:
- The consensus ID up to which the sender needs to be updated
-
getRegency
public int getRegency()
Retrieves the regency that the replica had when sending the state- Returns:
- The regency that the replica had when sending the state
-
getLeader
public int getLeader()
Retrieves the leader that the replica had when sending the state- Returns:
- The leader that the replica had when sending the state
-
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
-
-