org.objectweb.cjdbc.controller.loadbalancer.raidb1
Class RAIDb1_LPRF
java.lang.Object
org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer
org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1
org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF
- public class RAIDb1_LPRF
- extends RAIDb1
RAIDb-1 Round Robin load balancer featuring (Least Pending Requests First
load balancing algorithm).
The read requests coming from the Request Manager are sent
to the node that has the least pending read requests among the
nodes that can execute the request.
Write requests are broadcasted to all backends.
- Version:
- 1.0
- Author:
- Emmanuel Cecchet
Method Summary |
java.sql.ResultSet |
execReadRequest(SelectRequest request)
Selects the backend using a simple round-robin algorithm and executes the
read request. |
java.lang.String |
getInformation()
Gets information about the request load balancer. |
protected java.lang.String |
getRaidb1Xml()
Surrounding raidb1 tags can be treated by
getXmlInformation above, but
more detailed content have to be returned by the method
getRaidb1Xmlbelow. |
Methods inherited from class org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1 |
begin, commit, disableBackend, enableBackend, execReadStoredProcedure, executeRequest, execWriteRequest, execWriteRequestWithKeys, execWriteStoredProcedure, getXmlInformation, getXmlWaitPolicy, rollback, waitForAllWritesToComplete, waitForAllWritesToComplete, waitForAllWritesToComplete |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RAIDb1_LPRF
public RAIDb1_LPRF(VirtualDatabase vdb,
WaitForCompletionPolicy waitForCompletionPolicy)
throws java.sql.SQLException
- Creates a new RAIDb-1 Round Robin request load balancer.
- Parameters:
vdb
- the virtual database this load balancer belongs to.waitForCompletionPolicy
- how many backends must complete before returning
the result?
- Throws:
java.sql.SQLException
- if an error occurs
execReadRequest
public java.sql.ResultSet execReadRequest(SelectRequest request)
throws java.sql.SQLException
- Selects the backend using a simple round-robin algorithm and executes the
read request.
- Specified by:
execReadRequest
in class RAIDb1
- Throws:
java.sql.SQLException
- See Also:
RAIDb1.executeRequest(SelectRequest, DatabaseBackend)
getInformation
public java.lang.String getInformation()
- Gets information about the request load balancer.
- Specified by:
getInformation
in class AbstractLoadBalancer
- Returns:
String
containing information
getRaidb1Xml
protected java.lang.String getRaidb1Xml()
- Description copied from class:
RAIDb1
- Surrounding raidb1 tags can be treated by
getXmlInformation above, but
more detailed content have to be returned by the method
getRaidb1Xmlbelow.
- Specified by:
getRaidb1Xml
in class RAIDb1
- Returns:
- content of Raidb1 xml
- See Also:
RAIDb1.getRaidb1Xml()
Copyright © 2002, 2003 - ObjectWeb Consortium - All Rights Reserved.