Class HealthMessage.Entry

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
    Enclosing class:
    HealthMessage

    public static final class HealthMessage.Entry
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    Entries class
    See Also:
    Serialized Form
    • Constructor Detail

      • Entry

        public Entry​(SystemAdvertisement adv,
                     java.lang.String state,
                     long seqID)
        Creates a Entry with id and state
        Parameters:
        adv - SystemAdvertisement
        state - state value
        seqID - health message sequence ID
    • Method Detail

      • getSeqID

        public long getSeqID()
      • getSrcStartTime

        public long getSrcStartTime()
      • isFromSameMember

        public boolean isFromSameMember​(HealthMessage.Entry other)
        Since MasterNode reports on other peers that they are DEAD or INDOUBT, be sure not to compare sequence ids between a peer and a MasterNode health message report on that peer.
        Parameters:
        other - the entry of other peer
        Returns:
        true if this HM.entry and other are from same member.
      • isFromSameMemberStartup

        public boolean isFromSameMemberStartup​(HealthMessage.Entry other)
        Detect when one hm is from a failed member and the new hm is from the restart of that member.
        Parameters:
        other - the entry of other peer
        Returns:
        true if same instantiation of member sent this health message.
      • isState

        public boolean isState​(int theState)
      • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException