Class SMMessage

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SMMessage()  
      protected SMMessage​(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
      int getCID()
      Retrieves the consensus ID up to which the sender needs to be updated
      int getLeader()
      Retrieves the leader that the replica had when sending the state
      int getRegency()
      Retrieves the regency that the replica had when sending the state
      ApplicationState getState()
      Retrieves the state log
      int getType()
      Retrieves the type of the message
      View getView()
      Retrieves the state log
      void readExternal​(java.io.ObjectInput in)  
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TRIGGER_SM_LOCALLY

        public final boolean TRIGGER_SM_LOCALLY
    • 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 sender
        cid - Consensus ID up to which the sender needs to be updated
        type - Message type
        replica - Replica that should send the state
        state - 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:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class SystemMessage
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class SystemMessage
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException