Public Member Functions | |
RAIDb2_WRR (VirtualDatabase vdb, WaitForCompletionPolicy waitForCompletionPolicy, CreateTablePolicy createTablePolicy) 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 | getRaidb2Xml () |
The read requests coming from the request manager are sent to the backend nodes using a weighted round robin. Write requests are broadcasted to all backends.
Definition at line 52 of file RAIDb2_WRR.java.
|
Creates a new RAIDb-2 Weighted Round Robin request load balancer.
Definition at line 75 of file RAIDb2_WRR.java. 00078 { 00079 super(vdb, waitForCompletionPolicy, createTablePolicy); 00080 }
|
|
Chooses the node to execute the stored procedure using a round-robin algorithm. If the next node has not the needed stored procedure, we try the next one and so on until a suitable backend is found.
Implements org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer. Definition at line 112 of file RAIDb2_WRR.java. 00114 { 00115 throw new NotImplementedException(this.getClass().getName() 00116 + ":execReadStoredProcedure"); 00117 }
|
|
Performs a read request. It is up to the implementation to choose to which backend node(s) this request should be sent.
Implements org.objectweb.cjdbc.controller.loadbalancer.raidb2.RAIDb2. Definition at line 97 of file RAIDb2_WRR.java. 00099 { 00100 throw new NotImplementedException(this.getClass().getName() 00101 + ":execReadRequest"); 00102 }
|
|
Gets information about the request load balancer.
Implements org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer. Definition at line 141 of file RAIDb2_WRR.java. 00142 { 00143 if (weights == null) 00144 return "RAIDb-2 Weighted Round Robin Request load balancer: !!!Warning!!! No backend nodes found\n"; 00145 else 00146 return "RAIDb-2 Weighted Round Robin Request load balancer balancing over " 00147 + weights.size() + " nodes\n"; 00148 }
|
|
Implements org.objectweb.cjdbc.controller.loadbalancer.raidb2.RAIDb2. Definition at line 153 of file RAIDb2_WRR.java. 00154 {
00155 return WeightedBalancer.getRaidbXml(weights,
00156 DatabasesXmlTags.ELT_RAIDb_2_WeightedRoundRobin);
00157 }
|
|
Reimplemented from org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer. Definition at line 127 of file RAIDb2_WRR.java. 00128 { 00129 throw new SQLException("Weight is not supported with this load balancer"); 00130 }
|