|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.controller.loadbalancer.AbstractLoadBalancer
The Request Load Balancer should implement the load balancing of the requests among the backend nodes.
The requests comes from the Request Controller and are sent to the Connection Managers.
Field Summary | |
protected static Trace |
logger
|
protected int |
parsingGranularity
|
protected int |
raidbLevel
|
protected VirtualDatabase |
vdb
|
Constructor Summary | |
protected |
AbstractLoadBalancer(VirtualDatabase vdb,
int raidbLevel,
int parsingGranularity)
Generic constructor that sets some member variables and checks that backends are in the disabled state |
Method Summary | |
abstract void |
begin(TransactionMarkerMetaData tm)
Begin a new transaction. |
abstract void |
commit(TransactionMarkerMetaData tm)
Commit a transaction. |
abstract void |
disableBackend(DatabaseBackend db)
Disable a backend without further check. |
abstract void |
enableBackend(DatabaseBackend db)
Enable a backend without further check. |
abstract java.sql.ResultSet |
execReadRequest(SelectRequest request)
Perform a read request. |
abstract java.sql.ResultSet |
execReadStoredProcedure(StoredProcedure proc)
Call a stored procedure that returns a ResultSet. |
abstract int |
execWriteRequest(AbstractWriteRequest request)
Perform a write request. |
abstract java.sql.ResultSet |
execWriteRequestWithKeys(AbstractWriteRequest request)
Perform a write request and return a ResultSet containing the auto generated keys. |
abstract int |
execWriteStoredProcedure(StoredProcedure proc)
Call a stored procedure that performs an update. |
abstract java.lang.String |
getInformation()
Get information about the Request Load Balancer |
int |
getParsingGranularity()
Get the needed query parsing granularity. |
int |
getRAIDbLevel()
Returns the RAIDbLevel. |
abstract java.lang.String |
getXmlInformation()
Get information about the Request Load Balancer in xml |
abstract void |
rollback(TransactionMarkerMetaData tm)
Rollback a transaction. |
void |
setParsingGranularity(int parsingGranularity)
Set the needed query parsing granularity. |
void |
setRAIDbLevel(int raidbLevel)
Sets the RAIDbLevel. |
void |
setWeight(java.lang.String name,
int w)
Associate a weight to a backend identified by its logical name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected VirtualDatabase vdb
protected int raidbLevel
protected int parsingGranularity
protected static Trace logger
Constructor Detail |
protected AbstractLoadBalancer(VirtualDatabase vdb, int raidbLevel, int parsingGranularity) throws java.sql.SQLException
vdb
- The virtual database this load balancer belongs toraidbLevel
- The RAIDb level of this load balancerparsingGranularity
- The parsing granularity needed by this load balancerMethod Detail |
public int getRAIDbLevel()
public void setRAIDbLevel(int raidbLevel)
raidbLevel
- The RAIDbLevel to setpublic int getParsingGranularity()
public void setParsingGranularity(int parsingGranularity)
parsingGranularity
- the granularity to setpublic abstract java.sql.ResultSet execReadRequest(SelectRequest request) throws java.sql.SQLException
request
- an SelectRequest
java.sql.ResultSet
java.sql.SQLException
- if an error occurspublic abstract int execWriteRequest(AbstractWriteRequest request) throws java.sql.SQLException
request
- an AbstractWriteRequest
java.sql.SQLException
- if an error occurspublic abstract java.sql.ResultSet execWriteRequestWithKeys(AbstractWriteRequest request) throws java.sql.SQLException
request
- an AbstractWriteRequest
java.sql.SQLException
- if an error occurspublic abstract java.sql.ResultSet execReadStoredProcedure(StoredProcedure proc) throws java.sql.SQLException
proc
- the stored procedure call
java.sql.ResultSet
value
java.sql.SQLException
- if an error occurspublic abstract int execWriteStoredProcedure(StoredProcedure proc) throws java.sql.SQLException
proc
- the stored procedure call
java.sql.SQLException
- if an error occurspublic abstract void begin(TransactionMarkerMetaData tm) throws java.sql.SQLException
tm
- The transaction marker metadata
java.sql.SQLException
- if an error occurspublic abstract void commit(TransactionMarkerMetaData tm) throws java.sql.SQLException
tm
- The transaction marker metadata
java.sql.SQLException
- if an error occurspublic abstract void rollback(TransactionMarkerMetaData tm) throws java.sql.SQLException
tm
- The transaction marker metadata
java.sql.SQLException
- if an error occurspublic abstract void enableBackend(DatabaseBackend db) throws java.sql.SQLException
db
- The database backend to enable
java.sql.SQLException
- if an error occurspublic abstract void disableBackend(DatabaseBackend db) throws java.sql.SQLException
db
- The database backend to disable
java.sql.SQLException
- if an error occurspublic void setWeight(java.lang.String name, int w) throws java.sql.SQLException
name
- the backend namew
- the weight
java.sql.SQLException
- if an error occurspublic abstract java.lang.String getInformation()
String
containing informationpublic abstract java.lang.String getXmlInformation()
String
containing information, xml formatted
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |