|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoadbalanceAlgorithm
All load balance algorithms must implement this interface. Implementations of this interface can be registered in LoadbalanceManagers.
Method Summary | |
---|---|
LoadbalanceAlgorithm |
clone()
|
String |
getName()
Return the name of the load balancing algorithm |
Member |
getNextApplicationMember(AlgorithmContext algorithmContext)
This method returns the next member to which the request has been sent to, according to the algorithm implementation. |
Endpoint |
getNextEndpoint(MessageContext synapseMessageContext,
AlgorithmContext algorithmContext)
This method returns the next node according to the algorithm implementation. |
void |
reset(AlgorithmContext algorithmContext)
Resets the algorithm to its initial position. |
void |
setApplicationMembers(List<Member> members)
Set the application members |
void |
setEndpoints(List<Endpoint> endpoints)
Set the endpoints |
void |
setLoadBalanceEndpoint(Endpoint endpoint)
Set the loadbalance endpoint |
Method Detail |
---|
void setApplicationMembers(List<Member> members)
members
- The application membersvoid setEndpoints(List<Endpoint> endpoints)
endpoints
- The endpointsvoid setLoadBalanceEndpoint(Endpoint endpoint)
endpoint
- the endpoint which uses this algorithmEndpoint getNextEndpoint(MessageContext synapseMessageContext, AlgorithmContext algorithmContext)
synapseMessageContext
- SynapseMessageContext of the current messagealgorithmContext
- The context in which holds run time states related to the algorithm
Member getNextApplicationMember(AlgorithmContext algorithmContext)
algorithmContext
- The context in which holds run time states related to the algorithm
void reset(AlgorithmContext algorithmContext)
algorithmContext
- The context in which holds run time states related to the algorithmString getName()
LoadbalanceAlgorithm clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |