Package org.apache.cayenne.datasource
Class UnmanagedPoolingDataSource
java.lang.Object
org.apache.cayenne.datasource.UnmanagedPoolingDataSource
- All Implemented Interfaces:
- AutoCloseable,- Wrapper,- CommonDataSource,- DataSource,- PoolingDataSource
A non-blocking 
DataSource with a pool of connections.- Since:
- 4.0
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classAn exception indicating that a connection request waiting in the queue timed out and was unable to obtain a connection.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDefines a maximum time in milliseconds that a connection request could wait in the connection queue.
- 
Constructor SummaryConstructorsConstructorDescriptionUnmanagedPoolingDataSource(DataSource nonPoolingDataSource, PoolingDataSourceParameters parameters) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()getConnection(String userName, String password) intbooleanisWrapperFor(Class<?> iface) voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) <T> TMethods 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:
 
 
- 
- 
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
 
 
-