public class DruidPlugin extends Object implements IPlugin, IDataSourceProvider
DruidPlugin class.
| 构造器和说明 |
|---|
DruidPlugin(String url,
String username,
String password)
Constructor for DruidPlugin.
|
DruidPlugin(String url,
String username,
String password,
String driverClass)
Constructor for DruidPlugin.
|
DruidPlugin(String url,
String username,
String password,
String driverClass,
String filters)
Constructor for DruidPlugin.
|
| 限定符和类型 | 方法和说明 |
|---|---|
DruidPlugin |
addFilter(com.alibaba.druid.filter.Filter filter)
addFilter.
|
DataSource |
getDataSource()
getDataSource.
|
String |
getName()
Getter for the field
name. |
DruidPlugin |
set(int initialSize,
int minIdle,
int maxActive)
set.
|
void |
setConnectionInitSql(String sql)
Setter for the field
connectionInitSql. |
DruidPlugin |
setConnectionProperties(String connectionProperties)
Setter for the field
connectionProperties. |
DruidPlugin |
setDriverClass(String driverClass)
Setter for the field
driverClass. |
DruidPlugin |
setFilters(String filters)
Setter for the field
filters. |
DruidPlugin |
setInitialSize(int initialSize)
Setter for the field
initialSize. |
DruidPlugin |
setLogAbandoned(boolean logAbandoned)
Setter for the field
logAbandoned. |
DruidPlugin |
setMaxActive(int maxActive)
Setter for the field
maxActive. |
DruidPlugin |
setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize)
Setter for the field
maxPoolPreparedStatementPerConnectionSize. |
DruidPlugin |
setMaxWait(long maxWait)
Setter for the field
maxWait. |
DruidPlugin |
setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Setter for the field
minEvictableIdleTimeMillis. |
DruidPlugin |
setMinIdle(int minIdle)
Setter for the field
minIdle. |
void |
setName(String name)
Setter for the field
name. |
DruidPlugin |
setPublicKey(String publicKey)
Setter for the field
publicKey. |
DruidPlugin |
setRemoveAbandoned(boolean removeAbandoned)
Setter for the field
removeAbandoned. |
DruidPlugin |
setRemoveAbandonedTimeoutMillis(long removeAbandonedTimeoutMillis)
Setter for the field
removeAbandonedTimeoutMillis. |
DruidPlugin |
setTestOnBorrow(boolean testOnBorrow)
Setter for the field
testOnBorrow. |
DruidPlugin |
setTestOnReturn(boolean testOnReturn)
Setter for the field
testOnReturn. |
DruidPlugin |
setTestWhileIdle(boolean testWhileIdle)
Setter for the field
testWhileIdle. |
DruidPlugin |
setTimeBetweenConnectErrorMillis(long timeBetweenConnectErrorMillis)
Setter for the field
timeBetweenConnectErrorMillis. |
DruidPlugin |
setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Setter for the field
timeBetweenEvictionRunsMillis. |
DruidPlugin |
setValidationQuery(String validationQuery)
Setter for the field
validationQuery. |
boolean |
start()
start.
|
boolean |
stop()
stop.
|
public DruidPlugin(String url, String username, String password)
Constructor for DruidPlugin.
public DruidPlugin(String url, String username, String password, String driverClass)
Constructor for DruidPlugin.
public void setConnectionInitSql(String sql)
Setter for the field connectionInitSql.
sql - a String object.public final void setName(String name)
Setter for the field name.
name - a String object.public DruidPlugin setFilters(String filters)
Setter for the field filters.
filters - a String object.DruidPlugin object.public DruidPlugin addFilter(com.alibaba.druid.filter.Filter filter)
addFilter.
filter - a Filter object.DruidPlugin object.public DataSource getDataSource()
getDataSource.
getDataSource 在接口中 IDataSourceProviderDataSource object.public DruidPlugin set(int initialSize, int minIdle, int maxActive)
set.
initialSize - a int.minIdle - a int.maxActive - a int.DruidPlugin object.public DruidPlugin setDriverClass(String driverClass)
Setter for the field driverClass.
driverClass - a String object.DruidPlugin object.public DruidPlugin setInitialSize(int initialSize)
Setter for the field initialSize.
initialSize - a int.DruidPlugin object.public DruidPlugin setMinIdle(int minIdle)
Setter for the field minIdle.
minIdle - a int.DruidPlugin object.public DruidPlugin setMaxActive(int maxActive)
Setter for the field maxActive.
maxActive - a int.DruidPlugin object.public DruidPlugin setMaxWait(long maxWait)
Setter for the field maxWait.
maxWait - a long.DruidPlugin object.public DruidPlugin setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Setter for the field timeBetweenEvictionRunsMillis.
timeBetweenEvictionRunsMillis - a long.DruidPlugin object.public DruidPlugin setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Setter for the field minEvictableIdleTimeMillis.
minEvictableIdleTimeMillis - a long.DruidPlugin object.public DruidPlugin setValidationQuery(String validationQuery)
Setter for the field validationQuery.
validationQuery - a String object.DruidPlugin object.public DruidPlugin setTestWhileIdle(boolean testWhileIdle)
Setter for the field testWhileIdle.
testWhileIdle - a boolean.DruidPlugin object.public DruidPlugin setTestOnBorrow(boolean testOnBorrow)
Setter for the field testOnBorrow.
testOnBorrow - a boolean.DruidPlugin object.public DruidPlugin setTestOnReturn(boolean testOnReturn)
Setter for the field testOnReturn.
testOnReturn - a boolean.DruidPlugin object.public DruidPlugin setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize)
Setter for the field maxPoolPreparedStatementPerConnectionSize.
maxPoolPreparedStatementPerConnectionSize - a int.DruidPlugin object.public final DruidPlugin setTimeBetweenConnectErrorMillis(long timeBetweenConnectErrorMillis)
Setter for the field timeBetweenConnectErrorMillis.
timeBetweenConnectErrorMillis - a long.DruidPlugin object.public final DruidPlugin setRemoveAbandoned(boolean removeAbandoned)
Setter for the field removeAbandoned.
removeAbandoned - a boolean.DruidPlugin object.public final DruidPlugin setRemoveAbandonedTimeoutMillis(long removeAbandonedTimeoutMillis)
Setter for the field removeAbandonedTimeoutMillis.
removeAbandonedTimeoutMillis - a long.DruidPlugin object.public final DruidPlugin setLogAbandoned(boolean logAbandoned)
Setter for the field logAbandoned.
logAbandoned - a boolean.DruidPlugin object.public final DruidPlugin setConnectionProperties(String connectionProperties)
Setter for the field connectionProperties.
connectionProperties - a String object.DruidPlugin object.public final DruidPlugin setPublicKey(String publicKey)
Setter for the field publicKey.
publicKey - a String object.DruidPlugin object.Copyright © 2023. All rights reserved.