org.objectweb.cjdbc.controller.loadbalancer.policies.createtable
Class CreateTableRoundRobin

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.loadbalancer.policies.createtable.CreateTableRule
      extended byorg.objectweb.cjdbc.controller.loadbalancer.policies.createtable.CreateTableRoundRobin

public class CreateTableRoundRobin
extends CreateTableRule

Implements a round-robin strategy for CREATE TABLE statements.

Version:
1.0
Author:
Emmanuel Cecchet, Jean-Bernard van Zuylen

Field Summary
private  int index
           
 
Fields inherited from class org.objectweb.cjdbc.controller.loadbalancer.policies.createtable.CreateTableRule
backendList, nbOfNodes, policy, tableName
 
Constructor Summary
CreateTableRoundRobin()
          Creates a new CreateTableRoundRobin.
CreateTableRoundRobin(java.util.ArrayList backendList)
          Creates a new CreateTableRoundRobin.
 
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 org.objectweb.cjdbc.controller.loadbalancer.policies.createtable.CreateTableRule
addBackendName, getBackendList, getNumberOfNodes, getPolicy, getTableName, getXml, isDefaultRule, setNumberOfNodes, setPolicy, setTableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

private int index
Constructor Detail

CreateTableRoundRobin

public CreateTableRoundRobin()
Creates a new CreateTableRoundRobin.


CreateTableRoundRobin

public CreateTableRoundRobin(java.util.ArrayList backendList)
Creates a new CreateTableRoundRobin.

Parameters:
backendList - ArrayList of DatabaseBackend
Method Detail

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.