Class Decision


  • public class Decision
    extends java.lang.Object
    This class represents a Consensus Instance.
    • Field Detail

      • firstMessageProposed

        public TOMMessage firstMessageProposed
      • batchSize

        public int batchSize
    • Constructor Detail

      • Decision

        public Decision​(int cid)
        Creates a new instance of Decision
        Parameters:
        cid - The ID for the respective consensus
    • Method Detail

      • setRegency

        public void setRegency​(int regency)
        Set regency in which the value was decided
        Parameters:
        regency - Regency in which the value was decided
      • setLeader

        public void setLeader​(int leader)
        Set leader with which the value was decided
        Parameters:
        leader - Leader with which the value was decided
      • getRegency

        public int getRegency()
        Returns regency in which the value was decided
        Returns:
        Regency in which the value was decided
      • getLeader

        public int getLeader()
        Returns leader with which the value was decided
        Returns:
        Leader with which the value was decided
      • setDecisionEpoch

        public void setDecisionEpoch​(Epoch epoch)
        Set epoch in which the value was decided
        Parameters:
        epoch - The epoch in which the value was decided
      • getDecisionEpoch

        public Epoch getDecisionEpoch()
        Get epoch in which the value was decided
        Returns:
        The epoch in which the value was decided
      • getValue

        public byte[] getValue()
        Sets the decided value
        Returns:
        Decided Value
      • getDeserializedValue

        public TOMMessage[] getDeserializedValue()
      • getConsensusId

        public int getConsensusId()
        The ID for the associated consensus
        Returns:
        ID for the associated consensus
      • setValue

        public void setValue​(byte[] value)
        Sets the value of consensus
        Parameters:
        value - of consensus