public class DistributedDataSource extends 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, removeDecorator
appendInfo, close, equals, getDelegate, getInnermostDelegate, hashCode, isWrapperFor, toString, unwrap
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public 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 DataSource
getConnection
in class DecoratingDataSource
SQLException
public Connection getConnection(String username, String password) throws SQLException
getConnection
in interface DataSource
getConnection
in class DecoratingDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
getLogWriter
in class DelegatingDataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
getLoginTimeout
in class DelegatingDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
setLogWriter
in class DelegatingDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
setLoginTimeout
in class DelegatingDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
getParentLogger
in class DelegatingDataSource
SQLFeatureNotSupportedException
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.