Package bftsmart.consensus
Class Decision
- java.lang.Object
-
- bftsmart.consensus.Decision
-
public class Decision extends java.lang.Object
This class represents a Consensus Instance.
-
-
Field Summary
Fields Modifier and Type Field Description int
batchSize
TOMMessage
firstMessageProposed
-
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 int
getConsensusId()
The ID for the associated consensusEpoch
getDecisionEpoch()
Get epoch in which the value was decidedTOMMessage[]
getDeserializedValue()
int
getLeader()
Returns leader with which the value was decidedint
getRegency()
Returns regency in which the value was decidedbyte[]
getValue()
Sets the decided valuevoid
setDecisionEpoch(Epoch epoch)
Set epoch in which the value was decidedvoid
setLeader(int leader)
Set leader with which the value was decidedvoid
setRegency(int regency)
Set regency in which the value was decidedvoid
setValue(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
-
-