public interface PoolingRepositoryMBean
Modifier and Type | Field and Description |
---|---|
static String |
COUNTER_SESSION_ACTIVATED
The key name of the counter which counts session activation.
|
static String |
COUNTER_SESSION_CREATED
The key name of the counter which counts session creation.
|
static String |
COUNTER_SESSION_DESTROYED
The key name of the counter which counts session destroying.
|
static String |
COUNTER_SESSION_OBTAINED
The key name of the counter which counts session obtained by login.
|
static String |
COUNTER_SESSION_PASSIVATED
The key name of the counter which counts session passivation.
|
static String |
COUNTER_SESSION_RETURNED
The key name of the counter which counts session returned by logout.
|
static String |
WHEN_EXHAUSTED_BLOCK
When the sessions in the pool are exhausted, the pool will be blocked for the specified interval
to wait for available idle session.
|
static String |
WHEN_EXHAUSTED_FAIL
When the sessions in the pool are exhausted, the pool will throw exception instantly without
waiting for available idle session.
|
static String |
WHEN_EXHAUSTED_GROW
When the sessions in the pool are exhausted, the pool will grow the action session count to serve
the request.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears any sessions sitting idle in the pool by removing them from the idle instance pool.
|
void |
close()
Closes the pool
|
int |
getInitialSize()
Returns the initial size of the connection pool.
|
int |
getMaxActive()
Returns the maximum number of active connections that can be allocated at the same time.
|
int |
getMaxIdle()
Returns the maximum number of connections that can remain idle in the pool.
|
long |
getMaxWait()
Returns the maximum number of milliseconds that the pool will wait
for a connection to be returned before throwing an exception.
|
long |
getMinEvictableIdleTimeMillis()
Returns the
#minEvictableIdleTimeMillis property. |
int |
getMinIdle()
Returns the minimum number of idle connections in the pool
|
int |
getNumActive()
Returns the current active session count in the pool.
|
int |
getNumIdle()
Returns the current idle session count in the pool.
|
int |
getNumTestsPerEvictionRun()
Returns the value of the
#numTestsPerEvictionRun property. |
boolean |
getTestOnBorrow()
Returns the
#testOnBorrow property. |
boolean |
getTestOnReturn()
Returns the value of the
#testOnReturn property. |
boolean |
getTestWhileIdle()
Returns the value of the
#testWhileIdle property. |
long |
getTimeBetweenEvictionRunsMillis()
Returns the value of the
#timeBetweenEvictionRunsMillis property. |
String |
getValidationQuery()
Returns the validation query used to validate connections before
returning them.
|
String |
getWhenExhaustedAction()
Returns the action when the pool is exhausted returning them.
|
void |
initialize()
Initializes the pool
|
void |
setInitialSize(int initialSize)
Sets the initial size of the connection pool.
|
void |
setMaxActive(int maxActive)
Sets the maximum number of active connections that can be
allocated at the same time.
|
void |
setMaxIdle(int maxIdle)
Sets the maximum number of connections that can remain idle in the pool.
|
void |
setMaxWait(long maxWait)
Sets the maxWait property.
|
void |
setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Sets the
#minEvictableIdleTimeMillis property. |
void |
setMinIdle(int minIdle)
Sets the minimum number of idle connections in the pool.
|
void |
setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Sets the value of the
#numTestsPerEvictionRun property. |
void |
setTestOnBorrow(boolean testOnBorrow)
Sets the
#testOnBorrow property. |
void |
setTestOnReturn(boolean testOnReturn)
Sets the
testOnReturn property. |
void |
setTestWhileIdle(boolean testWhileIdle)
Sets the
testWhileIdle property. |
void |
setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Sets the
#timeBetweenEvictionRunsMillis property. |
void |
setValidationQuery(String validationQuery)
Sets the
#validationQuery . |
void |
setWhenExhaustedAction(String whenExhaustedAction)
Sets the
#whenExhaustedAction . |
static final String WHEN_EXHAUSTED_BLOCK
static final String WHEN_EXHAUSTED_FAIL
static final String WHEN_EXHAUSTED_GROW
static final String COUNTER_SESSION_CREATED
static final String COUNTER_SESSION_ACTIVATED
static final String COUNTER_SESSION_OBTAINED
static final String COUNTER_SESSION_RETURNED
static final String COUNTER_SESSION_PASSIVATED
static final String COUNTER_SESSION_DESTROYED
void clear()
int getNumActive()
int getNumIdle()
int getInitialSize()
void setInitialSize(int initialSize)
initialSize
- the number of connections created when the pool is initializedint getMaxActive()
void setMaxActive(int maxActive)
maxActive
- the new value for maxActivegetMaxActive()
int getMaxIdle()
void setMaxIdle(int maxIdle)
maxIdle
- the new value for maxIdlegetMaxIdle()
int getMinIdle()
void setMinIdle(int minIdle)
minIdle
- the new value for minIdlelong getMaxWait()
A value less than or equal to zero means the pool is set to wait indefinitely.
void setMaxWait(long maxWait)
Use -1 to make the pool wait indefinitely.
maxWait
- the new value for maxWaitgetMaxWait()
long getMinEvictableIdleTimeMillis()
#minEvictableIdleTimeMillis
property.#minEvictableIdleTimeMillis
property#minEvictableIdleTimeMillis
void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
#minEvictableIdleTimeMillis
property.minEvictableIdleTimeMillis
- the minimum amount of time an object
may sit idle in the pool#minEvictableIdleTimeMillis
int getNumTestsPerEvictionRun()
#numTestsPerEvictionRun
property.#numTestsPerEvictionRun
void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
#numTestsPerEvictionRun
property.numTestsPerEvictionRun
- the new #numTestsPerEvictionRun
value#numTestsPerEvictionRun
boolean getTestOnBorrow()
#testOnBorrow
property.#testOnBorrow
void setTestOnBorrow(boolean testOnBorrow)
#testOnBorrow
property. This property determines
whether or not the pool will validate objects before they are borrowed
from the pool. For a true
value to have any effect, the
validationQuery
property must be set to a non-null string.testOnBorrow
- new value for testOnBorrow propertyboolean getTestOnReturn()
#testOnReturn
property.#testOnReturn
void setTestOnReturn(boolean testOnReturn)
testOnReturn
property. This property determines
whether or not the pool will validate objects before they are returned
to the pool. For a true
value to have any effect, the
validationQuery
property must be set to a non-null string.testOnReturn
- new value for testOnReturn propertyboolean getTestWhileIdle()
#testWhileIdle
property.#testWhileIdle
void setTestWhileIdle(boolean testWhileIdle)
testWhileIdle
property. This property determines
whether or not the idle object evictor will validate connections. For a
true
value to have any effect, the
validationQuery
property must be set to a non-null string.testWhileIdle
- new value for testWhileIdle propertylong getTimeBetweenEvictionRunsMillis()
#timeBetweenEvictionRunsMillis
property.#timeBetweenEvictionRunsMillis
void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
#timeBetweenEvictionRunsMillis
property.timeBetweenEvictionRunsMillis
- the new time between evictor runs#timeBetweenEvictionRunsMillis
String getValidationQuery()
#validationQuery
void setValidationQuery(String validationQuery)
Sets the #validationQuery
.
validationQuery
- the new value for the JCR validation queryString getWhenExhaustedAction()
#whenExhaustedAction
void setWhenExhaustedAction(String whenExhaustedAction)
Sets the #whenExhaustedAction
.
whenExhaustedAction
- the new value for the action when the pool is exhaustedCopyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.