public class RoundRobin extends Object implements LoadbalanceAlgorithm
Constructor and Description |
---|
RoundRobin() |
RoundRobin(List endpoints) |
Modifier and Type | Method and Description |
---|---|
LoadbalanceAlgorithm |
clone() |
String |
getName()
Return the name of the load balancing algorithm
|
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.
|
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<org.apache.axis2.clustering.Member> members)
Set the application members
|
void |
setEndpoints(List<Endpoint> endpoints)
Set the endpoints
|
void |
setLoadBalanceEndpoint(Endpoint endpoint)
Set the loadbalance endpoint
|
public RoundRobin()
public RoundRobin(List endpoints)
public void setApplicationMembers(List<org.apache.axis2.clustering.Member> members)
LoadbalanceAlgorithm
setApplicationMembers
in interface LoadbalanceAlgorithm
members
- The application memberspublic void setEndpoints(List<Endpoint> endpoints)
LoadbalanceAlgorithm
setEndpoints
in interface LoadbalanceAlgorithm
endpoints
- The endpointspublic void setLoadBalanceEndpoint(Endpoint endpoint)
LoadbalanceAlgorithm
setLoadBalanceEndpoint
in interface LoadbalanceAlgorithm
endpoint
- the endpoint which uses this algorithmpublic Endpoint getNextEndpoint(MessageContext synCtx, AlgorithmContext algorithmContext)
getNextEndpoint
in interface LoadbalanceAlgorithm
synCtx
- MessageContext instance which holds all per-message propertiesalgorithmContext
- The context in which holds run time states related to the algorithmpublic org.apache.axis2.clustering.Member getNextApplicationMember(AlgorithmContext algorithmContext)
LoadbalanceAlgorithm
getNextApplicationMember
in interface LoadbalanceAlgorithm
algorithmContext
- The context in which holds run time states related to the algorithmpublic LoadbalanceAlgorithm clone()
clone
in interface LoadbalanceAlgorithm
clone
in class Object
public void reset(AlgorithmContext algorithmContext)
LoadbalanceAlgorithm
reset
in interface LoadbalanceAlgorithm
algorithmContext
- The context in which holds run time states related to the algorithmpublic String getName()
LoadbalanceAlgorithm
getName
in interface LoadbalanceAlgorithm
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.