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_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` | `getMaxSize()`
    `int` | `getMaxWaitQueueSize()`
    `int` | `hashCode()`
    `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

  - ### 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

    - #### 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 © 2019 Eclipse. All rights reserved.