Interface LoadbalanceAlgorithm

    • Method Detail

      • setApplicationMembers

        void setApplicationMembers​(List<org.apache.axis2.clustering.Member> members)
        Set the application members
        Parameters:
        members - The application members
      • setEndpoints

        void setEndpoints​(List<Endpoint> endpoints)
        Set the endpoints
        Parameters:
        endpoints - The endpoints
      • setLoadBalanceEndpoint

        void setLoadBalanceEndpoint​(Endpoint endpoint)
        Set the loadbalance endpoint
        Parameters:
        endpoint - the endpoint which uses this algorithm
      • getNextEndpoint

        Endpoint getNextEndpoint​(MessageContext synapseMessageContext,
                                 AlgorithmContext algorithmContext)
        This method returns the next node according to the algorithm implementation.
        Parameters:
        synapseMessageContext - SynapseMessageContext of the current message
        algorithmContext - The context in which holds run time states related to the algorithm
        Returns:
        Next node for directing the message
      • getNextApplicationMember

        org.apache.axis2.clustering.Member getNextApplicationMember​(AlgorithmContext algorithmContext)
        This method returns the next member to which the request has been sent to, according to the algorithm implementation.
        Parameters:
        algorithmContext - The context in which holds run time states related to the algorithm
        Returns:
        Next application member to which the request has to be sent to
      • reset

        void reset​(AlgorithmContext algorithmContext)
        Resets the algorithm to its initial position. Initial position depends on the implementation.
        Parameters:
        algorithmContext - The context in which holds run time states related to the algorithm
      • getName

        String getName()
        Return the name of the load balancing algorithm
        Returns:
        the name of the algorithm implemented