Package bftsmart.tom.leaderchange
Class CertifiedDecision
- java.lang.Object
-
- bftsmart.tom.leaderchange.CertifiedDecision
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
public class CertifiedDecision extends java.lang.Object implements java.io.Externalizable
Data about the last consensus decision- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CertifiedDecision()
Empty constructorCertifiedDecision(int pid, int cid, byte[] decision, java.util.Set<ConsensusMessage> consMsgs)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getCID()
Get consensus IDjava.util.Set<ConsensusMessage>
getConsMessages()
Get proof of the decision in the form of authenticated Consensus Messagesbyte[]
getDecision()
Get decision valueint
getPID()
Get process idint
hashCode()
void
readExternal(java.io.ObjectInput in)
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Constructor Detail
-
CertifiedDecision
public CertifiedDecision()
Empty constructor
-
CertifiedDecision
public CertifiedDecision(int pid, int cid, byte[] decision, java.util.Set<ConsensusMessage> consMsgs)
Constructor- Parameters:
pid
- process idcid
- execution iddecision
- decision valueconsMsgs
- proof of the decision in the form of authenticated Consensus Messages
-
-
Method Detail
-
getCID
public int getCID()
Get consensus ID- Returns:
- consensus ID
-
getDecision
public byte[] getDecision()
Get decision value- Returns:
- decision value
-
getConsMessages
public java.util.Set<ConsensusMessage> getConsMessages()
Get proof of the decision in the form of authenticated Consensus Messages- Returns:
- proof of the decision in the form of authenticated Consensus Messages
-
getPID
public int getPID()
Get process id- Returns:
- process id
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-