|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.endpoints.algorithms.WeightedRRLCAlgorithm
public class WeightedRRLCAlgorithm
This is a Weighted Round Robin Least Connection algorithm.
This algorithm is similar to WeightedRoundRobin algorithm
except it takes the active connections made by the endpoints in to account. Weights assinged
to each endpoint and these are static weights. But depending on the active connections these
weights are changed dynamically during the execution.
Algorithm assumes that the endpoint connections to total connection ratio should be eqault to endpoint weight to total weights ratio. If the ratios are different it tries to align them by changing the weights dynamically.
| Field Summary | |
|---|---|
static String |
LB_WEIGHTED_RRLC_ROUNDS_PER_RECAL
|
static String |
LB_WEIGHTED_RRLC_WEIGHT
|
static String |
LB_WEIGHTED_RRLC_WEIGHT_MAX
|
static String |
LB_WEIGHTED_RRLC_WEIGHT_MIN
|
static int |
LB_WEIGHTED_RRLC_WEIGHT_SKEW
|
| Constructor Summary | |
|---|---|
WeightedRRLCAlgorithm()
|
|
| Method Summary | |
|---|---|
LoadbalanceAlgorithm |
clone()
|
void |
destroy()
This method should implement the destroying of the implemented parts of the configuration. |
int |
getCurrentRound()
|
int |
getEndpointCursor()
|
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 messageContext,
AlgorithmContext algorithmContext)
This method returns the next node according to the algorithm implementation. |
int |
getRoundsPerRecalculation()
|
int |
getTotalConnections()
|
int |
getTotalWeight()
|
void |
init(SynapseEnvironment se)
This method should implement the initialization of the implemented parts of the configuration. |
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 |
| Field Detail |
|---|
public static final String LB_WEIGHTED_RRLC_ROUNDS_PER_RECAL
public static final String LB_WEIGHTED_RRLC_WEIGHT
public static final String LB_WEIGHTED_RRLC_WEIGHT_MIN
public static final String LB_WEIGHTED_RRLC_WEIGHT_MAX
public static final int LB_WEIGHTED_RRLC_WEIGHT_SKEW
| Constructor Detail |
|---|
public WeightedRRLCAlgorithm()
| 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 messageContext,
AlgorithmContext algorithmContext)
LoadbalanceAlgorithm
getNextEndpoint in interface LoadbalanceAlgorithmmessageContext - SynapseMessageContext of the current messagealgorithmContext - 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 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 LoadbalanceAlgorithmpublic LoadbalanceAlgorithm clone()
clone in interface LoadbalanceAlgorithmclone in class Objectpublic int getEndpointCursor()
public int getRoundsPerRecalculation()
public int getCurrentRound()
public int getTotalWeight()
public int getTotalConnections()
public void init(SynapseEnvironment se)
ManagedLifecycle
init in interface ManagedLifecyclese - SynapseEnvironment to be used for initializationpublic void destroy()
ManagedLifecycle
destroy in interface ManagedLifecycle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||