Class ConnectionPoolingProperties
java.lang.Object
org.apereo.cas.configuration.model.support.ConnectionPoolingProperties
- All Implemented Interfaces:
Serializable
@RequiresModule(name="cas-server-core-util",
automated=true)
public class ConnectionPoolingProperties
extends Object
implements Serializable
This is
ConnectionPoolingProperties
.- Since:
- 5.0.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis property controls the keepalive interval for a connection in the pool.This property controls the maximum lifetime of a connection in the pool.int
Controls the maximum number of connections to keep in the pool, including both idle and in-use connections.Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.int
Controls the minimum size that the pool is allowed to reach, including both idle and in-use connections.getName()
Set the name of the connection pool.long
The maximum number of milliseconds that the pool will wait for a connection to be validated as alive.boolean
Whether or not pool suspension is allowed.setKeepAliveTime
(String keepAliveTime) This property controls the keepalive interval for a connection in the pool.setMaximumLifetime
(String maximumLifetime) This property controls the maximum lifetime of a connection in the pool.setMaxSize
(int maxSize) Controls the maximum number of connections to keep in the pool, including both idle and in-use connections.setMaxWait
(String maxWait) Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.setMinSize
(int minSize) Controls the minimum size that the pool is allowed to reach, including both idle and in-use connections.Set the name of the connection pool.setSuspension
(boolean suspension) Whether or not pool suspension is allowed.setTimeoutMillis
(long timeoutMillis) The maximum number of milliseconds that the pool will wait for a connection to be validated as alive.
-
Constructor Details
-
ConnectionPoolingProperties
public ConnectionPoolingProperties()
-
-
Method Details
-
getMinSize
public int getMinSize()Controls the minimum size that the pool is allowed to reach, including both idle and in-use connections. -
getMaxSize
public int getMaxSize()Controls the maximum number of connections to keep in the pool, including both idle and in-use connections. -
getMaxWait
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout.
-
getKeepAliveTime
This property controls the keepalive interval for a connection in the pool. An in-use connection will never be tested by the keepalive thread, only when it is idle will it be tested. Default is zero, which disables this feature. -
getMaximumLifetime
This property controls the maximum lifetime of a connection in the pool. When a connection reaches this timeout, even if recently used, it will be retired from the pool. An in-use connection will never be retired, only when it is idle will it be removed. -
isSuspension
public boolean isSuspension()Whether or not pool suspension is allowed.There is a performance impact when pool suspension is enabled. Unless you need it (for a redundancy system for example) do not enable it.
-
getTimeoutMillis
public long getTimeoutMillis()The maximum number of milliseconds that the pool will wait for a connection to be validated as alive. -
getName
Set the name of the connection pool. This is primarily used for the MBean to uniquely identify the pool configuration. -
setMinSize
Controls the minimum size that the pool is allowed to reach, including both idle and in-use connections.- Returns:
this
.
-
setMaxSize
Controls the maximum number of connections to keep in the pool, including both idle and in-use connections.- Returns:
this
.
-
setMaxWait
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout.
- Returns:
this
.
-
setKeepAliveTime
This property controls the keepalive interval for a connection in the pool. An in-use connection will never be tested by the keepalive thread, only when it is idle will it be tested. Default is zero, which disables this feature.- Returns:
this
.
-
setMaximumLifetime
This property controls the maximum lifetime of a connection in the pool. When a connection reaches this timeout, even if recently used, it will be retired from the pool. An in-use connection will never be retired, only when it is idle will it be removed.- Returns:
this
.
-
setSuspension
Whether or not pool suspension is allowed.There is a performance impact when pool suspension is enabled. Unless you need it (for a redundancy system for example) do not enable it.
- Returns:
this
.
-
setTimeoutMillis
The maximum number of milliseconds that the pool will wait for a connection to be validated as alive.- Returns:
this
.
-
setName
Set the name of the connection pool. This is primarily used for the MBean to uniquely identify the pool configuration.- Returns:
this
.
-