public class DistributedDataSource extends org.apache.openjpa.lib.jdbc.DecoratingDataSource implements Iterable<DataSource>
| Constructor and Description |
|---|
DistributedDataSource(List<DataSource> dataSources) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDataSource(DataSource ds) |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
Iterator<DataSource> |
iterator() |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
addDecorator, addDecorators, clearDecorators, getDecorators, removeDecoratorappendInfo, close, equals, getDelegate, getInnermostDelegate, hashCode, isWrapperFor, toString, unwrapclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic DistributedDataSource(List<DataSource> dataSources)
public void addDataSource(DataSource ds)
public Iterator<DataSource> iterator()
iterator in interface Iterable<DataSource>public Connection getConnection() throws SQLException
getConnection in interface DataSourcegetConnection in class org.apache.openjpa.lib.jdbc.DecoratingDataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourcegetConnection in class org.apache.openjpa.lib.jdbc.DecoratingDataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourcegetLogWriter in class org.apache.openjpa.lib.jdbc.DelegatingDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourcegetLoginTimeout in class org.apache.openjpa.lib.jdbc.DelegatingDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourcesetLogWriter in class org.apache.openjpa.lib.jdbc.DelegatingDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourcesetLoginTimeout in class org.apache.openjpa.lib.jdbc.DelegatingDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourcegetParentLogger in class org.apache.openjpa.lib.jdbc.DelegatingDataSourceSQLFeatureNotSupportedExceptionCopyright © 2006–2022 Apache Software Foundation. All rights reserved.