Class 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 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 id
        cid - Consensus id
        ets - Consensus ETS
        quorumWrites - last value received from a Byzantine quorum of WRITEs
        writeSet - 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.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 interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException