org.objectweb.cjdbc.controller.loadbalancer.policies.createtable
Class CreateTableRandom
java.lang.Object
org.objectweb.cjdbc.controller.loadbalancer.policies.createtable.CreateTableRule
org.objectweb.cjdbc.controller.loadbalancer.policies.createtable.CreateTableRandom
- public class CreateTableRandom
- extends CreateTableRule
Implements a random strategy for CREATE TABLE
statements.
- Version:
- 1.0
- Author:
- Emmanuel Cecchet, Jean-Bernard van Zuylen
Field Summary |
private java.util.Random |
random
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
random
private java.util.Random random
CreateTableRandom
public CreateTableRandom()
- Creates a new
CreateTableRandom
.
CreateTableRandom
public CreateTableRandom(java.util.ArrayList backendList)
- Creates a new
CreateTableRandom
.
- Parameters:
backendList
- ArrayList
of DatabaseBackend
getBackends
public java.util.ArrayList getBackends(java.util.ArrayList backends)
throws CreateTableException
- Description copied from class:
CreateTableRule
- Pickups backends from the given backends arraylist according to the current
rule policy.
- Overrides:
getBackends
in class CreateTableRule
- Parameters:
backends
- backends to choose from
- Returns:
Arraylist
of choosen DatabaseBackend
- Throws:
CreateTableException
- in some specific implementations (not this
one)- See Also:
CreateTableRule.getBackends(ArrayList)
getInformation
public java.lang.String getInformation()
- Description copied from class:
CreateTableRule
- Gives information about the current policy.
- Specified by:
getInformation
in class CreateTableRule
- Returns:
- a
String
value - See Also:
CreateTableRule.getInformation()
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.