|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.controller.loadbalancer.policies.errorchecking.ErrorCheckingPolicy org.objectweb.cjdbc.controller.loadbalancer.policies.errorchecking.ErrorCheckingRandom
Chooses numberOfNodes nodes randomly for error checking.
Field Summary | |
private java.util.Random |
random
|
Fields inherited from class org.objectweb.cjdbc.controller.loadbalancer.policies.errorchecking.ErrorCheckingPolicy |
ALL, nbOfNodes, policy, RANDOM, ROUND_ROBIN |
Constructor Summary | |
ErrorCheckingRandom(int numberOfNodes)
Creates a new ErrorCheckingRandom instance. |
Method Summary | |
java.util.ArrayList |
getBackends(java.util.ArrayList backends)
Pickups backends from the given backends arraylist according to the current rule policy. |
java.lang.String |
getInformation()
Gives information about the current policy. |
Methods inherited from class org.objectweb.cjdbc.controller.loadbalancer.policies.errorchecking.ErrorCheckingPolicy |
getNumberOfNodes, getPolicy, getXml, setNumberOfNodes, setPolicy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Random random
Constructor Detail |
public ErrorCheckingRandom(int numberOfNodes)
ErrorCheckingRandom
instance.
numberOfNodes
- number of nodes to use to check for errors on a queryMethod Detail |
public java.util.ArrayList getBackends(java.util.ArrayList backends) throws ErrorCheckingException
ErrorCheckingPolicy
getBackends
in class ErrorCheckingPolicy
backends
- backends to choose from
DatabaseBackend
ErrorCheckingException
- if the rule cannot be appliedErrorCheckingPolicy.getBackends(ArrayList)
public java.lang.String getInformation()
ErrorCheckingPolicy
getInformation
in class ErrorCheckingPolicy
String
valueErrorCheckingPolicy.getInformation()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |