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 the minimum amount of time an object may sit idle in the pool
|
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 number of objects to examine during idle object evictor runs
|
boolean |
getTestOnBorrow()
Returns whether objects are validated before being borrowed from the pool
|
boolean |
getTestOnReturn()
Returns whether objects are validated before being returned to the pool
|
boolean |
getTestWhileIdle()
Returns whether objects examined by the idle object evictor are validated
|
long |
getTimeBetweenEvictionRunsMillis()
Returns the time (in miliseconds) between evictor runs
|
String |
getValidationQuery()
Returns the validation query used to validate connections.
|
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 the minimum amount of time an object may sit idle in the pool
|
void |
setMinIdle(int minIdle)
Sets the minimum number of idle connections in the pool.
|
void |
setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Sets the number of objects to examine during idle object evictor runs
|
void |
setTestOnBorrow(boolean testOnBorrow)
Sets whether or not the pool will validate objects before they are borrowed
from the pool.
|
void |
setTestOnReturn(boolean testOnReturn)
Sets whether or not the pool will validate objects before they are returned
to the pool.
|
void |
setTestWhileIdle(boolean testWhileIdle)
Sets whether or not the idle object evictor will validate connections.
|
void |
setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Sets the time (in miliseconds) between evictor runs
|
void |
setValidationQuery(String validationQuery)
Sets the validation query used to validate connections.
|
void |
setWhenExhaustedAction(String whenExhaustedAction)
Sets the action when the pool is exhausted returning them.
|
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()
void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
int getNumTestsPerEvictionRun()
void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
boolean getTestOnBorrow()
setTestOnBorrow(boolean)
void setTestOnBorrow(boolean testOnBorrow)
true
value to have any effect,
getValidationQuery()
must return a non-null string.testOnBorrow
- new value for testOnBorrow propertyboolean getTestOnReturn()
setTestOnReturn(boolean)
void setTestOnReturn(boolean testOnReturn)
true
value to have any effect, the
getValidationQuery()
must return a non-null string.testOnReturn
- new value for testOnReturn propertyboolean getTestWhileIdle()
setTestWhileIdle(boolean)
void setTestWhileIdle(boolean testWhileIdle)
true
value to have any effect, the
getValidationQuery()
must return a non-null string.testWhileIdle
- new value for testWhileIdle propertylong getTimeBetweenEvictionRunsMillis()
setTimeBetweenEvictionRunsMillis(long)
void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
timeBetweenEvictionRunsMillis
- the new time between evictor runsgetTimeBetweenEvictionRunsMillis()
String getValidationQuery()
setValidationQuery(String)
void setValidationQuery(String validationQuery)
validationQuery
- the new value for the JCR validation queryString getWhenExhaustedAction()
setWhenExhaustedAction(java.lang.String)
void setWhenExhaustedAction(String whenExhaustedAction)
whenExhaustedAction
- the new value for the action when the pool is exhaustedCopyright © 2008–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.