public interface IndexedDataSourceCluster extends DataSourceComponent
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ROLE
The name of the role for convenience
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getConnectionint getClusterSize()
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.SQLException