|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Field Summary | |
static java.lang.String |
ROLE
The name of the role for convenience |
| Method Summary | |
int |
getClusterSize()
Returns the number of DataSources in the cluster. |
java.sql.Connection |
getConnectionForHashCode(int hashCode)
Gets a Connection to a database given a hash code. |
java.sql.Connection |
getConnectionForHashObject(java.lang.Object hashObject)
Gets a Connection to a database given a hash object. |
java.sql.Connection |
getConnectionForIndex(int index)
Gets a Connection to a database given an index. |
int |
getIndexForHashCode(int hashCode)
Gets the index which will be resolved for a given hashCode. |
int |
getIndexForHashObject(java.lang.Object hashObject)
Gets the index which will be resolved for a given hashCode. |
| Methods inherited from interface org.apache.avalon.excalibur.datasource.DataSourceComponent |
getConnection |
| Methods inherited from interface org.apache.avalon.framework.configuration.Configurable |
configure |
| Field Detail |
public static final java.lang.String ROLE
| Method Detail |
public int getClusterSize()
public java.sql.Connection getConnectionForHashObject(java.lang.Object hashObject)
throws java.sql.SQLException
hashObject - Object whose hashCode will be used to select which of the Clusted
DataSources will be provide a Connection.
NoValidConnectionException - when there is no valid Connection wrapper
available in the classloader or when the index is not valid.
NoAvailableConnectionException - when there are no more available
Connections in the pool.
java.sql.SQLException
public java.sql.Connection getConnectionForHashCode(int hashCode)
throws java.sql.SQLException
hashCode - HashCode which will be used to select which of the Clusted
DataSources will be provide a Connection.
NoValidConnectionException - when there is no valid Connection wrapper
available in the classloader or when the index is not valid.
NoAvailableConnectionException - when there are no more available
Connections in the pool.
java.sql.SQLException
public java.sql.Connection getConnectionForIndex(int index)
throws java.sql.SQLException
index - Index of the DataSource for which a connection is to be returned.
NoValidConnectionException - when there is no valid Connection wrapper
available in the classloader or when the index is not valid.
NoAvailableConnectionException - when there are no more available
Connections in the pool.
java.sql.SQLExceptionpublic int getIndexForHashObject(java.lang.Object hashObject)
hashObject - Object whose hashCode will be used to select which of the Clusted
DataSources will be provide a Connection.public int getIndexForHashCode(int hashCode)
hashCode - HashCode which will be used to select which of the Clusted
DataSources will be provide a Connection.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||