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

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

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RAIDb1ec_WRR (VirtualDatabase vdb, WaitForCompletionPolicy waitForCompletionPolicy, ErrorCheckingPolicy errorCheckingPolicy, int nbOfConcurrentReads) throws Exception
ControllerResultSet execReadRequest (SelectRequest request, MetadataCache metadataCache) throws SQLException
ControllerResultSet execReadOnlyReadStoredProcedure (StoredProcedure proc, MetadataCache metadataCache) throws SQLException
void setWeight (String name, int w) throws SQLException
String getInformation ()
String getRaidb1Xml ()

Detailed Description

RAIDb-1 Weighted Round Robin load balancer with error checking.

This load balancer tolerates byzantine failures of databases. The read requests coming from the Request Manager are sent to multiple backend nodes and the results are compared. Write requests are broadcasted to all backends.

Author:
Emmanuel Cecchet

Julie Marguerite

Version:
1.0

Definition at line 53 of file RAIDb1ec_WRR.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1ec_WRR.RAIDb1ec_WRR VirtualDatabase  vdb,
WaitForCompletionPolicy  waitForCompletionPolicy,
ErrorCheckingPolicy  errorCheckingPolicy,
int  nbOfConcurrentReads
throws Exception
 

Creates a new RAIDb-1 Weighted Round Robin with error checking request load balancer.

Parameters:
vdb the virtual database this load balancer belongs to.
waitForCompletionPolicy How many backends must complete before returning the result?
errorCheckingPolicy policy to apply for error checking.
nbOfConcurrentReads number of concurrent reads allowed
Exceptions:
Exception if an error occurs

Definition at line 78 of file RAIDb1ec_WRR.java.

00082   {
00083     super(vdb, waitForCompletionPolicy, errorCheckingPolicy,
00084         nbOfConcurrentReads);
00085     // index = -1;
00086   }


Member Function Documentation

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

Not implemented.

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

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

Definition at line 109 of file RAIDb1ec_WRR.java.

00111   {
00112     throw new NotImplementedException(this.getClass().getName()
00113         + ":execReadStoredProcedure");
00114   }

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

Not implemented.

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

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

Definition at line 97 of file RAIDb1ec_WRR.java.

00099   {
00100     throw new NotImplementedException(this.getClass().getName()
00101         + ":execReadRequest");
00102   }

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

Gets information about the request load balancer.

Returns:
String containing information

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

Definition at line 142 of file RAIDb1ec_WRR.java.

00143   {
00144     // We don't lock since we don't need a top accurate value
00145     int size = vdb.getBackends().size();
00146 
00147     if (size == 0)
00148       return "RAIDb-1 Error Checking with Weighted Round-Robin Request load balancer: "
00149           + "!!!Warning!!! No backend nodes found\n";
00150     else
00151       return "RAIDb-1 Error Checking with Weighted Round-Robin Request load balancer ("
00152           + size + " backends)\n";
00153   }

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

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

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

Definition at line 158 of file RAIDb1ec_WRR.java.

00159   {
00160     return WeightedBalancer.getRaidbXml(weights,
00161         DatabasesXmlTags.ELT_RAIDb_1ec_WeightedRoundRobin);
00162   }

void org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1ec_WRR.setWeight String  name,
int  w
throws SQLException
 

See also:
org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer.setWeight(String, int)

Reimplemented from org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer.

Definition at line 124 of file RAIDb1ec_WRR.java.

References org.objectweb.cjdbc.common.log.Trace.debug(), and org.objectweb.cjdbc.common.log.Trace.isDebugEnabled().

00125   {
00126     if (logger.isDebugEnabled())
00127       logger.debug(Translate.get("loadbalancer.weight.set", new String[]{
00128           String.valueOf(w), name}));
00129 
00130     weights.put(name, new Integer(w));
00131   }


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