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
Since:
5.0.0
See Also:
  • 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

      public String 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

      public String 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

      public String 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

      public String getName()
      Set the name of the connection pool. This is primarily used for the MBean to uniquely identify the pool configuration.
    • setMinSize

      public ConnectionPoolingProperties setMinSize(int minSize)
      Controls the minimum size that the pool is allowed to reach, including both idle and in-use connections.
      Returns:
      this.
    • setMaxSize

      public ConnectionPoolingProperties setMaxSize(int maxSize)
      Controls the maximum number of connections to keep in the pool, including both idle and in-use connections.
      Returns:
      this.
    • setMaxWait

      public ConnectionPoolingProperties setMaxWait(String maxWait)
      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

      public ConnectionPoolingProperties setKeepAliveTime(String keepAliveTime)
      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

      public ConnectionPoolingProperties setMaximumLifetime(String maximumLifetime)
      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

      public ConnectionPoolingProperties setSuspension(boolean suspension)
      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

      public ConnectionPoolingProperties setTimeoutMillis(long timeoutMillis)
      The maximum number of milliseconds that the pool will wait for a connection to be validated as alive.
      Returns:
      this.
    • setName

      public ConnectionPoolingProperties setName(String name)
      Set the name of the connection pool. This is primarily used for the MBean to uniquely identify the pool configuration.
      Returns:
      this.