|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - The type of object that was load-balancedpublic interface ILBPolicy<T extends LoadBalanceable>
Interface of the policies for load-balancing.
| Method Summary | ||
|---|---|---|
T |
choose(java.util.List<T> loadBalanceables)
Chooses a load-balanceable among the list of load-balanceables. |
|
ILBStrategy<T> |
getLBStrategy()
Return a strategy to modify the behavior of this policy. |
|
DecisionManager<java.lang.Void> |
onInvokeException(java.lang.reflect.Method method,
java.lang.Object[] parameters,
T loadBalanceable,
java.lang.Throwable thr)
Returns a decision when an exception is thrown during an invocation for a given load-balanceable. |
|
DecisionManager<java.lang.Void> |
onLookupException(T loadBalanceable,
java.lang.Throwable thr)
Returns a decision when an exception is thrown during an access to a registry for a given load-balanceable. |
|
|
onReturn(java.lang.reflect.Method method,
java.lang.Object[] parameters,
T loadBalanceable,
ReturnType retVal)
Returns a decision when the invocation of a remote method ends. |
|
void |
setLBStrategy(ILBStrategy<T> lbStrategy)
Sets a strategy to modify the behavior of this policy. |
|
| Method Detail |
|---|
T choose(java.util.List<T> loadBalanceables)
throws NoLoadBalanceableException
loadBalanceables - a list of load-balanceables
NoLoadBalanceableException - if no server is availableILBStrategy<T> getLBStrategy()
void setLBStrategy(ILBStrategy<T> lbStrategy)
lbStrategy - a strategy of load-balancing
DecisionManager<java.lang.Void> onLookupException(T loadBalanceable,
java.lang.Throwable thr)
loadBalanceable - the load-balanceable that have caused the exceptionthr - the exception that is thrown
DecisionManager<java.lang.Void> onInvokeException(java.lang.reflect.Method method,
java.lang.Object[] parameters,
T loadBalanceable,
java.lang.Throwable thr)
method - the method that was invokedparameters - the parameters of the methodloadBalanceable - the load-balanceable that have caused the exceptionthr - the exception that is thrown
<ReturnType> DecisionManager<ReturnType> onReturn(java.lang.reflect.Method method,
java.lang.Object[] parameters,
T loadBalanceable,
ReturnType retVal)
ReturnType - the type of the returned valuemethod - the method that was invokedparameters - the parameters of the methodloadBalanceable - the load-balanceable used for the invocationretVal - the returned value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||