Package org.apache.cayenne.datasource
Class UnmanagedPoolingDataSource
java.lang.Object
org.apache.cayenne.datasource.UnmanagedPoolingDataSource
- All Implemented Interfaces:
- AutoCloseable,- Wrapper,- CommonDataSource,- DataSource,- PoolingDataSource
public class UnmanagedPoolingDataSource extends Object implements PoolingDataSource
A non-blocking 
DataSource with a pool of connections.- Since:
- 4.0
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classUnmanagedPoolingDataSource.ConnectionUnavailableExceptionAn exception indicating that a connection request waiting in the queue timed out and was unable to obtain a connection.
- 
Field SummaryFields Modifier and Type Field Description static intMAX_QUEUE_WAIT_DEFAULTDefines a maximum time in milliseconds that a connection request could wait in the connection queue.
- 
Constructor SummaryConstructors Constructor Description UnmanagedPoolingDataSource(DataSource nonPoolingDataSource, PoolingDataSourceParameters parameters)
- 
Method SummaryModifier and Type Method Description voidclose()ConnectiongetConnection()ConnectiongetConnection(String userName, String password)intgetLoginTimeout()PrintWritergetLogWriter()LoggergetParentLogger()booleanisWrapperFor(Class<?> iface)voidsetLoginTimeout(int seconds)voidsetLogWriter(PrintWriter out)<T> Tunwrap(Class<T> iface)Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSourcecreateShardingKeyBuilderMethods inherited from interface javax.sql.DataSourcecreateConnectionBuilder
- 
Field Details- 
MAX_QUEUE_WAIT_DEFAULTpublic static final int MAX_QUEUE_WAIT_DEFAULTDefines a maximum time in milliseconds that a connection request could wait in the connection queue. After this period expires, an exception will be thrown in the calling method.- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
UnmanagedPoolingDataSourcepublic UnmanagedPoolingDataSource(DataSource nonPoolingDataSource, PoolingDataSourceParameters parameters)
 
- 
- 
Method Details- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
 
- 
getConnection- Specified by:
- getConnectionin interface- DataSource
- Throws:
- SQLException
 
- 
getConnection- Specified by:
- getConnectionin interface- DataSource
- Throws:
- SQLException
 
- 
getLoginTimeout- Specified by:
- getLoginTimeoutin interface- CommonDataSource
- Specified by:
- getLoginTimeoutin interface- DataSource
- Throws:
- SQLException
 
- 
setLoginTimeout- Specified by:
- setLoginTimeoutin interface- CommonDataSource
- Specified by:
- setLoginTimeoutin interface- DataSource
- Throws:
- SQLException
 
- 
getLogWriter- Specified by:
- getLogWriterin interface- CommonDataSource
- Specified by:
- getLogWriterin interface- DataSource
- Throws:
- SQLException
 
- 
setLogWriter- Specified by:
- setLogWriterin interface- CommonDataSource
- Specified by:
- setLogWriterin interface- DataSource
- Throws:
- SQLException
 
- 
isWrapperFor- Specified by:
- isWrapperForin interface- Wrapper
- Throws:
- SQLException
 
- 
unwrap- Specified by:
- unwrapin interface- Wrapper
- Throws:
- SQLException
 
- 
getParentLogger- Specified by:
- getParentLoggerin interface- CommonDataSource
- Throws:
- SQLFeatureNotSupportedException
 
 
-