Class TribesClusteringAgent

    • Constructor Detail

      • TribesClusteringAgent

        public TribesClusteringAgent()
    • Method Detail

      • getMembers

        public List<Member> getMembers()
        Description copied from interface: ClusteringAgent
        Get the list of members in a static group
        Specified by:
        getMembers in interface ClusteringAgent
        Returns:
        The members if static group membership is used. If any other membership scheme is used, the values returned may not be valid
      • addGroupManagementAgent

        public void addGroupManagementAgent​(GroupManagementAgent agent,
                                            String applicationDomain)
        Description copied from interface: ClusteringAgent
        Set the load balance event handler which will be notified when load balance events occur. This will be valid only when this node is running in loadBalance mode
        Specified by:
        addGroupManagementAgent in interface ClusteringAgent
        Parameters:
        agent - The GroupManagementAgent to be added
        applicationDomain - The application domain which is handled by the GroupManagementAgent
      • addGroupManagementAgent

        public void addGroupManagementAgent​(GroupManagementAgent agent,
                                            String applicationDomain,
                                            String applicationSubDomain)
        Description copied from interface: ClusteringAgent
        Add a GroupManagementAgent to an application domain + sub-domain
        Specified by:
        addGroupManagementAgent in interface ClusteringAgent
        Parameters:
        agent - The GroupManagementAgent to be added
        applicationDomain - The application domain which is handled by the GroupManagementAgent
        applicationSubDomain - The application sub-domain which is handled by the GroupManagementAgent
      • getGroupManagementAgent

        public GroupManagementAgent getGroupManagementAgent​(String applicationDomain)
        Description copied from interface: ClusteringAgent
        Get the GroupManagementAgent which corresponds to the applicationDomain This will be valid only when this node is running in groupManagement
        Specified by:
        getGroupManagementAgent in interface ClusteringAgent
        Parameters:
        applicationDomain - The application domain to which the application nodes being load balanced belong to
        Returns:
        GroupManagementAgent which corresponds to the applicationDomain
      • getGroupManagementAgent

        public GroupManagementAgent getGroupManagementAgent​(String applicationDomain,
                                                            String applicationSubDomain)
        Description copied from interface: ClusteringAgent
        Get the GroupManagementAgent which corresponds to the applicationDomain + sub-domain
        Specified by:
        getGroupManagementAgent in interface ClusteringAgent
        Parameters:
        applicationDomain - The application domain which is handled by the GroupManagementAgent
        applicationSubDomain - The application sub-domain which is handled by the GroupManagementAgent
        Returns:
        GroupManagementAgent which corresponds to the applicationDomain + sub-domain
      • getDomains

        public Set<String> getDomains()
        Description copied from interface: ClusteringAgent
        Get all the domains that this ClusteringAgent belongs to
        Specified by:
        getDomains in interface ClusteringAgent
        Returns:
        the domains of this ClusteringAgent
      • isCoordinator

        public boolean isCoordinator()
        Description copied from interface: ClusteringAgent
        Checks whether this member is the coordinator for the cluster
        Specified by:
        isCoordinator in interface ClusteringAgent
        Returns:
        true if this member is the coordinator, and false otherwise
      • sendMessage

        public List<ClusteringCommand> sendMessage​(ClusteringMessage message,
                                                   boolean isRpcMessage)
                                            throws ClusteringFault
        Description copied from interface: ClusteringAgent
        Send a message to all members in this member's primary cluster
        Specified by:
        sendMessage in interface ClusteringAgent
        Parameters:
        message - The message to be sent
        isRpcMessage - Indicates whether the message has to be sent in RPC mode
        Returns:
        A list of responses if the message is sent in RPC mode
        Throws:
        ClusteringFault - If an error occurs while sending the message
      • setNodeManager

        public void setNodeManager​(NodeManager nodeManager)
        Description copied from interface: ClusteringAgent
        Set the NodeManager corresponding to this ClusteringAgent. This is an optional attribute. We can have a cluster with no configuration management, in which case the configurationManager will be null. This value is set by the ClusterBuilder, by reading the "configurationManager" element in the axis2.xml

        e.g.

        Specified by:
        setNodeManager in interface ClusteringAgent
        Parameters:
        nodeManager - The NodeManager instance
      • setStateManager

        public void setStateManager​(StateManager stateManager)
        Description copied from interface: ClusteringAgent
        Set the StateManager corresponding to this ClusteringAgent. This is an optional attribute. We can have a cluster with no context replication, in which case the contextManager will be null. This value is set by the ClusterBuilder, by reading the "contextManager" element in the axis2.xml

        e.g.

        Specified by:
        setStateManager in interface ClusteringAgent
        Parameters:
        stateManager - The StateManager instance
      • setConfigurationContext

        public void setConfigurationContext​(ConfigurationContext configurationContext)
        Description copied from interface: ClusteringAgent
        Set the system's configuration context. This will be used by the clustering implementations to get information about the Axis2 environment and to correspond with the Axis2 environment
        Specified by:
        setConfigurationContext in interface ClusteringAgent
        Parameters:
        configurationContext - The configuration context
      • synchronizeAllMembers

        public boolean synchronizeAllMembers()
        Method to check whether all members in the cluster have to be kept in sync at all times. Typically, this will require each member in the cluster to ACKnowledge receipt of a particular message, which may have a significant performance hit.
        Returns:
        true - if all members in the cluster should be kept in sync at all times, false otherwise