org.apache.avalon.excalibur.datasource.cluster
Interface IndexedDataSourceCluster
- All Superinterfaces:
- Component, Configurable, DataSourceComponent, ThreadSafe
- All Known Implementing Classes:
- DefaultIndexedDataSourceCluster
- public interface IndexedDataSourceCluster
- extends DataSourceComponent
- Since:
- 4.1
- Version:
- CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:20 $
- Author:
| 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 |
getConnectionForIndex(int index)
Gets a Connection to a database given an index. |
ROLE
public static final java.lang.String ROLE
-
The name of the role for convenience
getClusterSize
public int getClusterSize()
-
Returns the number of DataSources in the cluster.
-
-
- Returns:
- size of the cluster.
getConnectionForIndex
public java.sql.Connection getConnectionForIndex(int index)
throws java.sql.SQLException
-
Gets a Connection to a database given an index.
-
-
- Parameters:
index - Index of the DataSource for which a connection is to be returned.
- Throws:
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
Please see keelframework.org for information about new Keel releases.