java.lang .Object org.continuent.sequoia.controller.loadbalancer.policies.createtable .CreateTablePolicy Field Summary final public static int ALL Table is created on all backends in the backend list.final public static int RANDOM Pickup a backend name randomly in the backend list.final public static int ROUND_ROBIN Backends are chosen using a round-robin algorithm.
ALL final public static int ALL (Code) Table is created on all backends in the backend list.
RANDOM final public static int RANDOM (Code) Pickup a backend name randomly in the backend list.
ROUND_ROBIN final public static int ROUND_ROBIN (Code) Backends are chosen using a round-robin algorithm.
addRule public void addRule(CreateTableRule rule)(Code) Adds a rule to this policy.
If the rule's table name is null
, the rule is considered as
the default rule
Parameters: rule - rule to add
getDefaultRule public CreateTableRule getDefaultRule()(Code) Returns the default rule or null
if no default rule has been
defined.
a CreateTableRule
getRuleList public HashMap getRuleList()(Code) Returns the rule Hashmap(table name,rule).
Hashmap
getTableRule public CreateTableRule getTableRule(String tableName)(Code) Gets the rule corresponding to a table name.
Parameters: tableName - table name of the rule the rule or null
if no specific rule has beendefined for this table
getXml public String getXml()(Code) Returns xml formatted string containing information on all rules of the
system
xml formatted string.
getXmlValue final public static String getXmlValue(int policy) (Code) Returns the xml attribute value for the given policy
Parameters: policy - the policy to convert xml attribute value or "" if not found