|
|||||||||||
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
Defines the policy to adopt for error checking.
Field Summary | |
static int |
ALL
Request is sent to all backends. |
protected int |
nbOfNodes
Number of nodes that are involved in error-checking per request. |
protected int |
policy
|
static int |
RANDOM
Pickup backends randomly. |
static int |
ROUND_ROBIN
Backends are chosen using a round-robin algorithm. |
Constructor Summary | |
ErrorCheckingPolicy(int policy,
int numberOfNodes)
Creates a new CreateTableRule . |
Method Summary | |
abstract java.util.ArrayList |
getBackends(java.util.ArrayList backends)
Pickups backends from the given backends arraylist according to the current rule policy. |
abstract java.lang.String |
getInformation()
Gives information about the current policy. |
int |
getNumberOfNodes()
Returns the number of nodes. |
int |
getPolicy()
Returns the policy. |
java.lang.String |
getXml()
Convert this error checking policy to xml |
void |
setNumberOfNodes(int numberOfNodes)
Sets the number of nodes. |
void |
setPolicy(int policy)
Sets the policy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RANDOM
public static final int ROUND_ROBIN
public static final int ALL
protected int nbOfNodes
protected int policy
Constructor Detail |
public ErrorCheckingPolicy(int policy, int numberOfNodes)
CreateTableRule
.
policy
- implemented policynumberOfNodes
- number of nodes to use to check for errors on a queryMethod Detail |
public int getNumberOfNodes()
int
valuesetNumberOfNodes(int)
public void setNumberOfNodes(int numberOfNodes)
numberOfNodes
- the number of nodes to setgetNumberOfNodes()
public int getPolicy()
int
valuesetPolicy(int)
public void setPolicy(int policy)
policy
- the policy to setgetPolicy()
public abstract java.util.ArrayList getBackends(java.util.ArrayList backends) throws ErrorCheckingException
backends
- backends to choose from
DatabaseBackend
ErrorCheckingException
- if the rule cannot be appliedpublic abstract java.lang.String getInformation()
String
valuepublic java.lang.String getXml()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |