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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetConnection(String username, String password) intiterator()voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) Methods inherited from class org.apache.openjpa.lib.jdbc.DecoratingDataSource
addDecorator, addDecorators, clearDecorators, getDecorators, removeDecoratorMethods inherited from class org.apache.openjpa.lib.jdbc.DelegatingDataSource
appendInfo, close, equals, getDelegate, getInnermostDelegate, hashCode, isWrapperFor, toString, unwrapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilderMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DistributedDataSource
-
-
Method Details
-
addDataSource
-
iterator
- Specified by:
iteratorin interfaceIterable<DataSource>
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Overrides:
getConnectionin classDecoratingDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Overrides:
getConnectionin classDecoratingDataSource- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Overrides:
getLogWriterin classDelegatingDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Overrides:
getLoginTimeoutin classDelegatingDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Overrides:
setLogWriterin classDelegatingDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Overrides:
setLoginTimeoutin classDelegatingDataSource- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Overrides:
getParentLoggerin classDelegatingDataSource- Throws:
SQLFeatureNotSupportedException
-