org.objectweb.cjdbc.controller.loadbalancer.raidb1
Class RAIDb1ec_WRR
java.lang.Object
javax.management.StandardMBean
org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer
org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1
org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1ec
org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1ec_WRR
- All Implemented Interfaces:
- AbstractLoadBalancerMBean, javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, XmlComponent
- public class RAIDb1ec_WRR
- extends RAIDb1ec
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.
- Version:
- 1.0
- Author:
- Emmanuel Cecchet , Julie Marguerite
Nested classes inherited from class javax.management.StandardMBean |
|
Field Summary |
private java.util.HashMap |
weights
|
Fields inherited from class javax.management.StandardMBean |
|
Methods inherited from class org.objectweb.cjdbc.controller.loadbalancer.raidb1.RAIDb1 |
begin, commit, execReadStoredProcedure, executeRequestOnBackend, executeStoredProcedureOnBackend, execWriteRequest, execWriteRequestWithKeys, execWriteStoredProcedure, getNumberOfEnabledBackends, releaseSavepoint, rollback, rollback, setSavepoint, waitForAllWritesToComplete, waitForAllWritesToComplete, waitForAllWritesToComplete |
Methods inherited from class org.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer |
executeReadStoredProcedureOnBackend, executeSelectRequestOnBackend, executeUpdateRequestOnBackend, executeUpdateRequestOnBackendWithKeys, executeWriteStoredProcedureOnBackend, getAssociatedString, getConnectionAndBeginTransaction, getParsingGranularity, getRAIDbLevel, getXml, handleMacros, removeHeadFromAndNotifyTotalOrderQueue, setMacroHandler, setParsingGranularity, setRAIDbLevel, waitForTotalOrder |
Methods inherited from class org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean |
addNotificationListener, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getNotificationInfo, getParameterName, getParameterName, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class javax.management.StandardMBean |
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, invoke, setAttribute, setAttributes, setImplementation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
weights
private java.util.HashMap weights
RAIDb1ec_WRR
public RAIDb1ec_WRR(VirtualDatabase vdb,
WaitForCompletionPolicy waitForCompletionPolicy,
ErrorCheckingPolicy errorCheckingPolicy,
int nbOfConcurrentReads)
throws java.lang.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
- Throws:
java.lang.Exception
- if an error occurs
execReadRequest
public ControllerResultSet execReadRequest(SelectRequest request,
MetadataCache metadataCache)
throws java.sql.SQLException
- Not implemented.
- Specified by:
execReadRequest
in class RAIDb1
- Throws:
java.sql.SQLException
- See Also:
RAIDb1.execReadRequest(SelectRequest, MetadataCache)
execReadOnlyReadStoredProcedure
public ControllerResultSet execReadOnlyReadStoredProcedure(StoredProcedure proc,
MetadataCache metadataCache)
throws java.sql.SQLException
- Not implemented.
- Specified by:
execReadOnlyReadStoredProcedure
in class AbstractLoadBalancer
- Parameters:
proc
- the stored procedure callmetadataCache
- MetadataCache (null if none)
- Returns:
- a
ControllerResultSet
value
- Throws:
java.sql.SQLException
- if an error occurs- See Also:
AbstractLoadBalancer.execReadOnlyReadStoredProcedure(StoredProcedure, MetadataCache)
setWeight
public void setWeight(java.lang.String name,
int w)
throws java.sql.SQLException
- Description copied from class:
AbstractLoadBalancer
- Associate a weight to a backend identified by its logical name.
- Specified by:
setWeight
in interface AbstractLoadBalancerMBean
- Overrides:
setWeight
in class AbstractLoadBalancer
- Parameters:
name
- the backend namew
- the weight
- Throws:
java.sql.SQLException
- if an error occurs- See Also:
AbstractLoadBalancer.setWeight(String,
int)
getInformation
public java.lang.String getInformation()
- Gets information about the request load balancer.
- Specified by:
getInformation
in interface AbstractLoadBalancerMBean
- Specified by:
getInformation
in class AbstractLoadBalancer
- Returns:
String
containing information
getRaidb1Xml
public java.lang.String getRaidb1Xml()
- Description copied from class:
RAIDb1
- Surrounding raidb1 tags can be treated by getXmlImpl
above, but more detailed content have to be returned by the method
getRaidb1Xml below.
- Specified by:
getRaidb1Xml
in class RAIDb1
- Returns:
- content of Raidb1 xml
- See Also:
RAIDb1.getRaidb1Xml()
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.