io.vertx.sqlclient

## Class PoolOptions

- java.lang.Object
- - io.vertx.sqlclient.PoolOptions

-     public class PoolOptions
      extends Object

  The options for configuring a connection pool.
  Author:
    Julien Viet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_IDLE_TIMEOUT` Default connection timeout in the pool = 0 (no timeout)
    `static TimeUnit` | `DEFAULT_IDLE_TIMEOUT_TIME_UNIT` Default connection idle time unit in the pool = seconds
    `static int` | `DEFAULT_MAX_SIZE` The default maximum number of connections a client will pool = 4
    `static int` | `DEFAULT_MAX_WAIT_QUEUE_SIZE` Default max wait queue size = -1 (unbounded)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PoolOptions()`
    `PoolOptions(JsonObject json)`
    `PoolOptions(PoolOptions other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `int` | `getIdleTimeout()`
    `TimeUnit` | `getIdleTimeoutUnit()`
    `int` | `getMaxSize()`
    `int` | `getMaxWaitQueueSize()`
    `int` | `hashCode()`
    `PoolOptions` | `setIdleTimeout(int idleTimeout)` Establish an idle timeout for pooled connections.
    `PoolOptions` | `setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)` Establish an idle timeout unit for pooled connections.
    `PoolOptions` | `setMaxSize(int maxSize)` Set the maximum pool size
    `PoolOptions` | `setMaxWaitQueueSize(int maxWaitQueueSize)` Set the maximum connection request allowed in the wait queue, any requests beyond the max size will result in an failure.
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_MAX_SIZE

          public static final int DEFAULT_MAX_SIZE

      The default maximum number of connections a client will pool = 4
      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_WAIT_QUEUE_SIZE

          public static final int DEFAULT_MAX_WAIT_QUEUE_SIZE

      Default max wait queue size = -1 (unbounded)
      See Also:
        Constant Field Values

    - #### DEFAULT_IDLE_TIMEOUT

          public static final int DEFAULT_IDLE_TIMEOUT

      Default connection timeout in the pool = 0 (no timeout)
      See Also:
        Constant Field Values

    - #### DEFAULT_IDLE_TIMEOUT_TIME_UNIT

          public static final TimeUnit DEFAULT_IDLE_TIMEOUT_TIME_UNIT

      Default connection idle time unit in the pool = seconds

  - ### Constructor Detail

    - #### PoolOptions

          public PoolOptions()

    - #### PoolOptions

          public PoolOptions(JsonObject json)

    - #### PoolOptions

          public PoolOptions(PoolOptions other)

  - ### Method Detail

    - #### getMaxSize

          public int getMaxSize()

      Returns:
        the maximum pool size

    - #### setMaxSize

          public PoolOptions setMaxSize(int maxSize)

      Set the maximum pool size
      Parameters:
        `maxSize` - the maximum pool size
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMaxWaitQueueSize

          public int getMaxWaitQueueSize()

      Returns:
        the maximum wait queue size

    - #### setMaxWaitQueueSize

          public PoolOptions setMaxWaitQueueSize(int maxWaitQueueSize)

      Set the maximum connection request allowed in the wait queue, any requests beyond the max size will result in an failure. If the value is set to a negative number then the queue will be unbounded.
      Parameters:
        `maxWaitQueueSize` - the maximum number of waiting requests
      Returns:
        a reference to this, so the API can be used fluently

    - #### getIdleTimeoutUnit

          public TimeUnit getIdleTimeoutUnit()

      Returns:
        the pooled connection idle timeout unit

    - #### setIdleTimeoutUnit

          public PoolOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)

      Establish an idle timeout unit for pooled connections.
      Parameters:
        `idleTimeoutUnit` - pooled connection idle time unit
      Returns:
        a reference to this, so the API can be used fluently

    - #### getIdleTimeout

          public int getIdleTimeout()

      Returns:
        pooled connection idle timeout

    - #### setIdleTimeout

          public PoolOptions setIdleTimeout(int idleTimeout)

      Establish an idle timeout for pooled connections.
      Parameters:
        `idleTimeout` - the pool connection idle time unitq
      Returns:
        a reference to this, so the API can be used fluently

    - #### toJson

          public JsonObject toJson()

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2021 Eclipse. All rights reserved.