org.apache.openjpa.slice.jdbc
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) |
protected void |
enforceAbstract()
Marker to enforce that subclasses of this class are abstract.
|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Iterator<DataSource> |
iterator() |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
addDecorator, addDecorators, clearDecorators, getDecorators, newDecoratingDataSource, removeDecorator
appendInfo, close, equals, getDelegate, getInnermostDelegate, hashCode, isWrapperFor, newInstance, toString, unwrap
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
protected void enforceAbstract()
DelegatingDataSource
enforceAbstract
in class DelegatingDataSource
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.