Class Topology


  • public final class Topology
    extends Object
    • Constructor Detail

      • Topology

        public Topology​(Object owner)
    • Method Detail

      • clear

        public void clear()
        It will remove all elements as if it haven't received anyone from the server.
      • updateAsLive

        public void updateAsLive​(String nodeId,
                                 TopologyMemberImpl memberInput)
        This is called by the server when the node is activated from backup state. It will always succeed
      • resendNode

        public void resendNode​(String nodeId)
        After the node is started, it will resend the notifyLive a couple of times to avoid gossip between two servers
        Parameters:
        nodeId -
      • updateBackup

        public TopologyMemberImpl updateBackup​(TopologyMemberImpl memberInput)
        This is called by the server when the node is activated from backup state. It will always succeed
      • updateMember

        public boolean updateMember​(long uniqueEventID,
                                    String nodeId,
                                    TopologyMemberImpl memberInput)
        Parameters:
        uniqueEventID - an unique identifier for when the change was made. We will use current time millis for starts, and a ++ of that number for shutdown.
        nodeId -
        memberInput -
        Returns:
        true if an update did take place. Note that backups are *always* updated.
      • isEmpty

        public boolean isEmpty()
      • describe

        public String describe()
      • setOwner

        public void setOwner​(Object owner)
        The owner exists mainly for debug purposes. When enabling logging and tracing, the Topology updates will include the owner, what will enable to identify what instances are receiving the updates, what will enable better debugging.