java.lang.Object
org.apache.activemq.artemis.core.client.impl.Topology

public final class Topology extends Object
A Topology describes the other cluster nodes that this server knows about.
  • Constructor Details

    • Topology

      public Topology(Object owner)
    • Topology

      public Topology(Object owner, Executor executor)
  • Method Details

    • setExecutor

      public Topology setExecutor(Executor executor)
    • clear

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

      public void addClusterTopologyListener(ClusterTopologyListener listener)
    • removeClusterTopologyListener

      public void removeClusterTopologyListener(ClusterTopologyListener listener)
    • updateAsPrimary

      public void updateAsPrimary(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 notifyPrimary a couple of times to avoid gossip between two servers
    • 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)
      Update a member
      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.
      Returns:
      true if an update did take place. Note that backups are *always* updated
    • sendTopology

      public void sendTopology(ClusterTopologyListener listener)
    • getMember

      public TopologyMemberImpl getMember(String nodeID)
    • getMember

      public TopologyMemberImpl getMember(RemotingConnection rc)
    • isEmpty

      public boolean isEmpty()
    • getMembers

      public Collection<TopologyMemberImpl> getMembers()
    • 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.
    • getBackupForConnector

      public TransportConfiguration getBackupForConnector(Connector connector)
    • toString

      public String toString()
      Overrides:
      toString in class Object