|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.endpoints.algorithms.RoundRobin
public class RoundRobin
This is the implementation of the round robin load balancing algorithm. It simply iterates through the endpoint list one by one for until an active endpoint is found.
| Constructor Summary | |
|---|---|
RoundRobin()
|
|
RoundRobin(List endpoints)
|
|
| 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 synCtx,
AlgorithmContext algorithmContext)
Choose an active endpoint using the round robin algorithm. |
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoundRobin()
public RoundRobin(List endpoints)
| Method Detail |
|---|
public void setApplicationMembers(List<Member> members)
LoadbalanceAlgorithm
setApplicationMembers in interface LoadbalanceAlgorithmmembers - The application memberspublic void setEndpoints(List<Endpoint> endpoints)
LoadbalanceAlgorithm
setEndpoints in interface LoadbalanceAlgorithmendpoints - The endpointspublic void setLoadBalanceEndpoint(Endpoint endpoint)
LoadbalanceAlgorithm
setLoadBalanceEndpoint in interface LoadbalanceAlgorithmendpoint - the endpoint which uses this algorithm
public Endpoint getNextEndpoint(MessageContext synCtx,
AlgorithmContext algorithmContext)
getNextEndpoint in interface LoadbalanceAlgorithmsynCtx - MessageContext instance which holds all per-message propertiesalgorithmContext - The context in which holds run time states related to the algorithm
public Member getNextApplicationMember(AlgorithmContext algorithmContext)
LoadbalanceAlgorithm
getNextApplicationMember in interface LoadbalanceAlgorithmalgorithmContext - The context in which holds run time states related to the algorithm
public LoadbalanceAlgorithm clone()
clone in interface LoadbalanceAlgorithmclone in class Objectpublic void reset(AlgorithmContext algorithmContext)
LoadbalanceAlgorithm
reset in interface LoadbalanceAlgorithmalgorithmContext - The context in which holds run time states related to the algorithmpublic String getName()
LoadbalanceAlgorithm
getName in interface LoadbalanceAlgorithm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||