Package com.logicaldoc.core.util
Class ConnectionPool
java.lang.Object
com.logicaldoc.core.util.ConnectionPool
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Wrapper,- CommonDataSource,- DataSource
A configurable connection pool that wraps different technologies, you decide
 the implementation through the implementation setting: hikari or dbcp
- Since:
- 8.2
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()getConnection(String username, String password) intvoidinit()booleanisWrapperFor(Class<?> iface) voidsetDbcpConfig(DbcpConfiguration dbcpConfig) voidsetHikariConfig(com.zaxxer.hikari.HikariConfig hikaryConfig) voidsetImplementation(String implementation) voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) <T> TMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSourcecreateShardingKeyBuilderMethods inherited from interface javax.sql.DataSourcecreateConnectionBuilder
- 
Constructor Details- 
ConnectionPoolpublic ConnectionPool()
 
- 
- 
Method Details- 
getWrappedDataSource
- 
setHikariConfigpublic void setHikariConfig(com.zaxxer.hikari.HikariConfig hikaryConfig) 
- 
getLogWriter- Specified by:
- getLogWriterin interface- CommonDataSource
- Specified by:
- getLogWriterin interface- DataSource
- Throws:
- SQLException
 
- 
unwrap- Specified by:
- unwrapin interface- Wrapper
- Throws:
- SQLException
 
- 
setLogWriter- Specified by:
- setLogWriterin interface- CommonDataSource
- Specified by:
- setLogWriterin interface- DataSource
- Throws:
- SQLException
 
- 
isWrapperFor- Specified by:
- isWrapperForin interface- Wrapper
- Throws:
- SQLException
 
- 
getConnection- Specified by:
- getConnectionin interface- DataSource
- Throws:
- SQLException
 
- 
setLoginTimeout- Specified by:
- setLoginTimeoutin interface- CommonDataSource
- Specified by:
- setLoginTimeoutin 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
 
- 
getParentLogger- Specified by:
- getParentLoggerin interface- CommonDataSource
- Throws:
- SQLFeatureNotSupportedException
 
- 
initpublic void init()
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
- 
setImplementation
- 
setDbcpConfig
 
-