Package bftsmart.consensus
Class Decision
- java.lang.Object
-
- bftsmart.consensus.Decision
-
public class Decision extends java.lang.ObjectThis class represents a Consensus Instance.
-
-
Field Summary
Fields Modifier and Type Field Description intbatchSizeTOMMessagefirstMessageProposed
-
Constructor Summary
Constructors Constructor Description Decision(int cid)Creates a new instance of Decision
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetConsensusId()The ID for the associated consensusEpochgetDecisionEpoch()Get epoch in which the value was decidedTOMMessage[]getDeserializedValue()intgetLeader()Returns leader with which the value was decidedintgetRegency()Returns regency in which the value was decidedbyte[]getValue()Sets the decided valuevoidsetDecisionEpoch(Epoch epoch)Set epoch in which the value was decidedvoidsetLeader(int leader)Set leader with which the value was decidedvoidsetRegency(int regency)Set regency in which the value was decidedvoidsetValue(byte[] value)Sets the value of consensus
-
-
-
Field Detail
-
firstMessageProposed
public TOMMessage firstMessageProposed
-
batchSize
public int batchSize
-
-
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
-
-