Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF Class Reference

Inheritance diagram for org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RAIDb1_LPRF (VirtualDatabase vdb, WaitForCompletionPolicy waitForCompletionPolicy) throws Exception
ControllerResultSet execReadRequest (SelectRequest request, MetadataCache metadataCache) throws SQLException
ControllerResultSet execReadOnlyReadStoredProcedure (StoredProcedure proc, MetadataCache metadataCache) throws SQLException
String getInformation ()
String getRaidb1Xml ()

Detailed Description

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.

Author:
Emmanuel Cecchet
Version:
1.0

Definition at line 54 of file RAIDb1_LPRF.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF.RAIDb1_LPRF VirtualDatabase  vdb,
WaitForCompletionPolicy  waitForCompletionPolicy
throws Exception
 

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?
Exceptions:
Exception if an error occurs

Definition at line 75 of file RAIDb1_LPRF.java.

00077   {
00078     super(vdb, waitForCompletionPolicy);
00079   }


Member Function Documentation

ControllerResultSet org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF.execReadOnlyReadStoredProcedure StoredProcedure  proc,
MetadataCache  metadataCache
throws SQLException [virtual]
 

Selects the backend using a least pending request first policy. The backend that has the shortest queue of currently executing queries is chosen to execute this stored procedure.

See also:
org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer.execReadOnlyReadStoredProcedure(StoredProcedure, MetadataCache)

Implements org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer.

Definition at line 107 of file RAIDb1_LPRF.java.

00109   {
00110     return executeLPRF(proc, false, "Stored procedure ", metadataCache);
00111   }

ControllerResultSet org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF.execReadRequest SelectRequest  request,
MetadataCache  metadataCache
throws SQLException [virtual]
 

Selects the backend using a least pending request first policy. The backend that has the shortest queue of currently executing queries is chosen to execute this query.

See also:
org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1.execReadRequest(SelectRequest, MetadataCache)

Implements org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1.

Definition at line 93 of file RAIDb1_LPRF.java.

00095   {
00096     return executeLPRF(request, true, "Request ", metadataCache);
00097   }

String org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF.getInformation  )  [virtual]
 

Gets information about the request load balancer.

Returns:
String containing information

Implements org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer.

Definition at line 245 of file RAIDb1_LPRF.java.

00246   {
00247     // We don't lock since we don't need a top accurate value
00248     int size = vdb.getBackends().size();
00249 
00250     if (size == 0)
00251       return "RAIDb-1 Least Pending Request First load balancer: !!!Warning!!! No backend nodes found\n";
00252     else
00253       return "RAIDb-1 Least Pending Request First load balancer (" + size
00254           + " backends)\n";
00255   }

String org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1_LPRF.getRaidb1Xml  )  [virtual]
 

See also:
org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1.getRaidb1Xml

Implements org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1.

Definition at line 260 of file RAIDb1_LPRF.java.

00261   {
00262     return "<" + DatabasesXmlTags.ELT_RAIDb_1_LeastPendingRequestsFirst + "/>";
00263   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:04:03 2005 for C-JDBC by  doxygen 1.3.9.1