Package bftsmart.tom.leaderchange
Class CollectData
- java.lang.Object
-
- bftsmart.tom.leaderchange.CollectData
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
public class CollectData extends java.lang.Object implements java.io.Externalizable
This class represents a COLLECT object with the information about the running consensus- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectData()
Empty constructorCollectData(int pid, int cid, int ets, TimestampValuePair quorumWrites, java.util.HashSet<TimestampValuePair> writeSet)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getCid()
Get consensus idint
getEts()
Get consensus ETSint
getPid()
Get process idTimestampValuePair
getQuorumWrites()
Get value received from a Byzantine quorum of WRITEsjava.util.HashSet<TimestampValuePair>
getWriteSet()
Get set of values written by the replicaint
hashCode()
void
readExternal(java.io.ObjectInput in)
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Constructor Detail
-
CollectData
public CollectData()
Empty constructor
-
CollectData
public CollectData(int pid, int cid, int ets, TimestampValuePair quorumWrites, java.util.HashSet<TimestampValuePair> writeSet)
Constructor- Parameters:
pid
- process idcid
- Consensus idets
- Consensus ETSquorumWrites
- last value received from a Byzantine quorum of WRITEswriteSet
- values written by the replica
-
-
Method Detail
-
getCid
public int getCid()
Get consensus id- Returns:
- consensus id
-
getEts
public int getEts()
Get consensus ETS- Returns:
- consensus ETS
-
getPid
public int getPid()
Get process id- Returns:
- process id
-
getQuorumWrites
public TimestampValuePair getQuorumWrites()
Get value received from a Byzantine quorum of WRITEs- Returns:
- value received from a Byzantine quorum of WRITEs
-
getWriteSet
public java.util.HashSet<TimestampValuePair> getWriteSet()
Get set of values written by the replica- Returns:
- set of values written by the replica
-
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
-
-