|
|||||||||||
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.createtable.CreateTableRule
Defines the policy to adopt when creating a new table.
Field Summary | |
protected java.util.ArrayList |
backendList
List of backend names to wait for. |
protected int |
nbOfNodes
Number of nodes that must create the table. |
protected int |
policy
|
protected java.lang.String |
tableName
Table name pattern to which this rule apply (null means it is the default rule). |
Constructor Summary | |
CreateTableRule(int policy)
Constructor for CreateTableRule. |
|
CreateTableRule(int policy,
java.util.ArrayList backendList)
Creates a new CreateTableRule instance. |
Method Summary | |
void |
addBackendName(java.lang.String name)
Add a backend name to the list of backends to wait for. |
java.util.ArrayList |
getBackendList()
Returns the backendList. |
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 |
getTableName()
Returns the table name. |
java.lang.String |
getXml()
Gives information about the current policy in xml |
boolean |
isDefaultRule()
Returns true if this rule is the default rule. |
void |
setNumberOfNodes(int numberOfNodes)
Sets the number of nodes. |
void |
setPolicy(int policy)
Sets the policy. |
void |
setTableName(java.lang.String tableName)
Sets the table name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.ArrayList backendList
protected int nbOfNodes
protected java.lang.String tableName
protected int policy
Constructor Detail |
public CreateTableRule(int policy)
policy
- the implemented policypublic CreateTableRule(int policy, java.util.ArrayList backendList)
CreateTableRule
instance.
policy
- the implemented policybackendList
- the backend list to useMethod Detail |
public void addBackendName(java.lang.String name)
name
- backend namepublic java.util.ArrayList getBackendList()
public int getNumberOfNodes()
int
valuepublic void setNumberOfNodes(int numberOfNodes)
numberOfNodes
- the number of nodes to setpublic java.lang.String getTableName()
String
valuepublic void setTableName(java.lang.String tableName)
tableName
- the table name to setpublic int getPolicy()
int
valuepublic void setPolicy(int policy)
policy
- the policy to setpublic boolean isDefaultRule()
true
if this rule is the default rule.
boolean
public java.util.ArrayList getBackends(java.util.ArrayList backends) throws CreateTableException
backends
- backends to choose from
Arraylist
of choosen DatabaseBackend
CreateTableException
- in some specific implementations (not this
one)public abstract java.lang.String getInformation()
String
valuepublic java.lang.String getXml()
String
value in xml
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |