Class SimpleReplicatedLogEntry

    • Constructor Detail

      • SimpleReplicatedLogEntry

        public SimpleReplicatedLogEntry​(long index,
                                        long term,
                                        Payload payload)
        Constructs an instance.
        Parameters:
        index - the index
        term - the term
        payload - the payload
    • Method Detail

      • size

        public int size()
        Description copied from interface: ReplicatedLogEntry
        Returns the size of the entry in bytes. An approximate number may be good enough.
        Specified by:
        size in interface ReplicatedLogEntry
        Returns:
        the size of the entry in bytes.
      • serializedSize

        public int serializedSize()
        Description copied from interface: ReplicatedLogEntry
        Return the estimate of serialized size of this entry when passed through serialization. The estimate needs to be reasonably accurate and should err on the side of caution and report a slightly-higher size in face of uncertainty.
        Specified by:
        serializedSize in interface ReplicatedLogEntry
        Returns:
        An estimate of serialized size.
      • isPersistencePending

        public boolean isPersistencePending()
        Description copied from interface: ReplicatedLogEntry
        Checks if persistence is pending for this entry.
        Specified by:
        isPersistencePending in interface ReplicatedLogEntry
        Returns:
        true if persistence is pending, false otherwise.
      • setPersistencePending

        public void setPersistencePending​(boolean pending)
        Description copied from interface: ReplicatedLogEntry
        Sets whether or not persistence is pending for this entry.
        Specified by:
        setPersistencePending in interface ReplicatedLogEntry
        Parameters:
        pending - the new setting.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object