|
|||||||||||
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.CreateTablePolicy
Defines the policy to adopt when creating a new table.
Field Summary | |
static int |
ALL
Table is created on all backends in the backend list. |
static int |
RANDOM
Pickup a backend name randomly in the backend list. |
static int |
ROUND_ROBIN
Backends are chosen using a round-robin algorithm. |
private java.util.HashMap |
ruleList
List of backends to wait for. |
Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent |
DOCTYPE_CONTROLLER, DOCTYPE_DB, XML_VERSION |
Constructor Summary | |
CreateTablePolicy()
|
Method Summary | |
void |
addRule(CreateTableRule rule)
Adds a rule to this policy. |
CreateTableRule |
getDefaultRule()
Returns the default rule or null if no default rule has
been defined. |
java.util.HashMap |
getRuleList()
Returns the rule Hashmap(table name,rule). |
CreateTableRule |
getTableRule(java.lang.String tableName)
Gets the rule corresponding to a table name. |
java.lang.String |
getXml()
Returns xml formatted string containing information on all rules of the system |
static java.lang.String |
getXmlValue(int policy)
Returns the xml attribute value for the given 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
private java.util.HashMap ruleList
Constructor Detail |
public CreateTablePolicy()
Method Detail |
public void addRule(CreateTableRule rule)
null
,
the rule is considered as the default rule
rule
- rule to addpublic java.util.HashMap getRuleList()
public CreateTableRule getTableRule(java.lang.String tableName)
tableName
- table name of the rule
null
if no specific rule has been
defined for this tablepublic CreateTableRule getDefaultRule()
null
if no default rule has
been defined.
CreateTableRule
public static final java.lang.String getXmlValue(int policy)
policy
- the policy to convert
public java.lang.String getXml()
getXml
in interface XmlComponent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |