Package org.hippoecm.hst.core.jcr.pool
Interface PoolingRepositoryMBean
-
- All Known Subinterfaces:
PoolingRepository
public interface PoolingRepositoryMBean
PoolingRepositoryMBean- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field 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.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clears any sessions sitting idle in the pool by removing them from the idle instance pool.void
close()
Closes the poolint
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 poolint
getMinIdle()
Returns the minimum number of idle connections in the poolint
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 runsboolean
getTestOnBorrow()
Returns whether objects are validated before being borrowed from the poolboolean
getTestOnReturn()
Returns whether objects are validated before being returned to the poolboolean
getTestWhileIdle()
Returns whether objects examined by the idle object evictor are validatedlong
getTimeBetweenEvictionRunsMillis()
Returns the time (in miliseconds) between evictor runsString
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 poolvoid
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 poolvoid
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 runsvoid
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 runsvoid
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.
-
-
-
Field Detail
-
WHEN_EXHAUSTED_BLOCK
static final 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.- See Also:
- Constant Field Values
-
WHEN_EXHAUSTED_FAIL
static final String WHEN_EXHAUSTED_FAIL
When the sessions in the pool are exhausted, the pool will throw exception instantly without waiting for available idle session.- See Also:
- Constant Field Values
-
WHEN_EXHAUSTED_GROW
static final String WHEN_EXHAUSTED_GROW
When the sessions in the pool are exhausted, the pool will grow the action session count to serve the request. This option will make the max active count limit meaningless.- See Also:
- Constant Field Values
-
COUNTER_SESSION_CREATED
static final String COUNTER_SESSION_CREATED
The key name of the counter which counts session creation.- See Also:
- Constant Field Values
-
COUNTER_SESSION_ACTIVATED
static final String COUNTER_SESSION_ACTIVATED
The key name of the counter which counts session activation.- See Also:
- Constant Field Values
-
COUNTER_SESSION_OBTAINED
static final String COUNTER_SESSION_OBTAINED
The key name of the counter which counts session obtained by login.- See Also:
- Constant Field Values
-
COUNTER_SESSION_RETURNED
static final String COUNTER_SESSION_RETURNED
The key name of the counter which counts session returned by logout.- See Also:
- Constant Field Values
-
COUNTER_SESSION_PASSIVATED
static final String COUNTER_SESSION_PASSIVATED
The key name of the counter which counts session passivation.- See Also:
- Constant Field Values
-
COUNTER_SESSION_DESTROYED
static final String COUNTER_SESSION_DESTROYED
The key name of the counter which counts session destroying.- See Also:
- Constant Field Values
-
-
Method Detail
-
clear
void clear()
Clears any sessions sitting idle in the pool by removing them from the idle instance pool.
-
getNumActive
int getNumActive()
Returns the current active session count in the pool.
-
getNumIdle
int getNumIdle()
Returns the current idle session count in the pool.
-
getInitialSize
int getInitialSize()
Returns the initial size of the connection pool.
-
setInitialSize
void setInitialSize(int initialSize)
Sets the initial size of the connection pool.- Parameters:
initialSize
- the number of connections created when the pool is initialized
-
getMaxActive
int getMaxActive()
Returns the maximum number of active connections that can be allocated at the same time.
-
setMaxActive
void setMaxActive(int maxActive)
Sets the maximum number of active connections that can be allocated at the same time. Use a negative value for no limit.- Parameters:
maxActive
- the new value for maxActive- See Also:
getMaxActive()
-
getMaxIdle
int getMaxIdle()
Returns the maximum number of connections that can remain idle in the pool.
-
setMaxIdle
void setMaxIdle(int maxIdle)
Sets the maximum number of connections that can remain idle in the pool.- Parameters:
maxIdle
- the new value for maxIdle- See Also:
getMaxIdle()
-
getMinIdle
int getMinIdle()
Returns the minimum number of idle connections in the pool
-
setMinIdle
void setMinIdle(int minIdle)
Sets the minimum number of idle connections in the pool.- Parameters:
minIdle
- the new value for minIdle
-
getMaxWait
long getMaxWait()
Returns the maximum number of milliseconds that the pool will wait for a connection to be returned before throwing an exception.A value less than or equal to zero means the pool is set to wait indefinitely.
- Returns:
- the maxWait property value
-
setMaxWait
void setMaxWait(long maxWait)
Sets the maxWait property.Use -1 to make the pool wait indefinitely.
- Parameters:
maxWait
- the new value for maxWait- See Also:
getMaxWait()
-
getMinEvictableIdleTimeMillis
long getMinEvictableIdleTimeMillis()
Returns the the minimum amount of time an object may sit idle in the pool
-
setMinEvictableIdleTimeMillis
void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Sets the the minimum amount of time an object may sit idle in the pool
-
getNumTestsPerEvictionRun
int getNumTestsPerEvictionRun()
Returns the number of objects to examine during idle object evictor runs
-
setNumTestsPerEvictionRun
void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Sets the number of objects to examine during idle object evictor runs
-
getTestOnBorrow
boolean getTestOnBorrow()
Returns whether objects are validated before being borrowed from the pool- See Also:
setTestOnBorrow(boolean)
-
setTestOnBorrow
void setTestOnBorrow(boolean testOnBorrow)
Sets whether or not the pool will validate objects before they are borrowed from the pool. For atrue
value to have any effect,getValidationQuery()
must return a non-null string.- Parameters:
testOnBorrow
- new value for testOnBorrow property
-
getTestOnReturn
boolean getTestOnReturn()
Returns whether objects are validated before being returned to the pool- See Also:
setTestOnReturn(boolean)
-
setTestOnReturn
void setTestOnReturn(boolean testOnReturn)
Sets whether or not the pool will validate objects before they are returned to the pool. For atrue
value to have any effect, thegetValidationQuery()
must return a non-null string.- Parameters:
testOnReturn
- new value for testOnReturn property
-
getTestWhileIdle
boolean getTestWhileIdle()
Returns whether objects examined by the idle object evictor are validated- See Also:
setTestWhileIdle(boolean)
-
setTestWhileIdle
void setTestWhileIdle(boolean testWhileIdle)
Sets whether or not the idle object evictor will validate connections. For atrue
value to have any effect, thegetValidationQuery()
must return a non-null string.- Parameters:
testWhileIdle
- new value for testWhileIdle property
-
getTimeBetweenEvictionRunsMillis
long getTimeBetweenEvictionRunsMillis()
Returns the time (in miliseconds) between evictor runs- See Also:
setTimeBetweenEvictionRunsMillis(long)
-
setTimeBetweenEvictionRunsMillis
void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Sets the time (in miliseconds) between evictor runs- Parameters:
timeBetweenEvictionRunsMillis
- the new time between evictor runs- See Also:
getTimeBetweenEvictionRunsMillis()
-
getValidationQuery
String getValidationQuery()
Returns the validation query used to validate connections.- Returns:
- the JCR validation query
- See Also:
setValidationQuery(String)
-
setValidationQuery
void setValidationQuery(String validationQuery)
Sets the validation query used to validate connections.- Parameters:
validationQuery
- the new value for the JCR validation query
-
getWhenExhaustedAction
String getWhenExhaustedAction()
Returns the action when the pool is exhausted returning them.- Returns:
- the action when the pool is exhausted
- See Also:
setWhenExhaustedAction(java.lang.String)
-
setWhenExhaustedAction
void setWhenExhaustedAction(String whenExhaustedAction)
Sets the action when the pool is exhausted returning them.- Parameters:
whenExhaustedAction
- the new value for the action when the pool is exhausted
-
-