Package org.apache.openjpa.slice.jdbc
Class DistributedDataSource
java.lang.Object
org.apache.openjpa.lib.jdbc.DelegatingDataSource
org.apache.openjpa.lib.jdbc.DecoratingDataSource
org.apache.openjpa.slice.jdbc.DistributedDataSource
- All Implemented Interfaces:
Iterable<DataSource>
,Wrapper
,CommonDataSource
,DataSource
,Closeable
A virtual datasource that contains many physical datasources.
- Author:
- Pinaki Poddar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getConnection
(String username, String password) int
iterator()
void
setLoginTimeout
(int seconds) void
setLogWriter
(PrintWriter out) Methods inherited from class org.apache.openjpa.lib.jdbc.DecoratingDataSource
addDecorator, addDecorators, clearDecorators, getDecorators, removeDecorator
Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingDataSource
appendInfo, close, equals, getDelegate, getInnermostDelegate, hashCode, isWrapperFor, toString, unwrap
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DistributedDataSource
-
-
Method Details
-
addDataSource
-
iterator
- Specified by:
iterator
in interfaceIterable<DataSource>
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Overrides:
getConnection
in classDecoratingDataSource
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Overrides:
getConnection
in classDecoratingDataSource
- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriter
in interfaceCommonDataSource
- Specified by:
getLogWriter
in interfaceDataSource
- Overrides:
getLogWriter
in classDelegatingDataSource
- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeout
in interfaceCommonDataSource
- Specified by:
getLoginTimeout
in interfaceDataSource
- Overrides:
getLoginTimeout
in classDelegatingDataSource
- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriter
in interfaceCommonDataSource
- Specified by:
setLogWriter
in interfaceDataSource
- Overrides:
setLogWriter
in classDelegatingDataSource
- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeout
in interfaceCommonDataSource
- Specified by:
setLoginTimeout
in interfaceDataSource
- Overrides:
setLoginTimeout
in classDelegatingDataSource
- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLogger
in interfaceCommonDataSource
- Overrides:
getParentLogger
in classDelegatingDataSource
- Throws:
SQLFeatureNotSupportedException
-