PoolManager (Apache Geode 1.9.2)
Date: 2019-10-15

org.apache.geode.cache.client

## Class PoolManager

- java.lang.Object
- - org.apache.geode.cache.client.PoolManager

-     public final class PoolManager
      extends Object

  Manages creation and access to `connection pools` for clients.

  To create a pool get a factory by calling `createFactory()`.

  To find an existing pool by name call `find(String)`.

  To get rid of all created pool call `close()`.

  Since:
    GemFire 5.7

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `close()` Unconditionally destroys all created pools that are in this manager.
    `static void` | `close(boolean keepAlive)` Unconditionally destroys all created pools that are in this manager.
    `static PoolFactory` | `createFactory()` Creates a new `pool factory`, which is used to configure and create new `Pool`s.
    `static Pool` | `find(Region<?,?> region)` Find the pool used by the given region.
    `static Pool` | `find(String name)` Find by name an existing connection pool returning the existing pool or `null` if it does not exist.
    `static Map<String,Pool>` | `getAll()` Returns a map containing all the pools in this manager.

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

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

- - ### Method Detail

    - #### createFactory

          public static PoolFactory createFactory()

      Creates a new `pool factory`, which is used to configure and create new `Pool`s.
      Returns:
        the new pool factory

    - #### find

          public static Pool find(String name)

      Find by name an existing connection pool returning the existing pool or `null` if it does not exist.
      Parameters:
        `name` - the name of the connection pool
      Returns:
        the existing connection pool or `null` if it does not exist.

    - #### getAll

          public static Map<String,Pool> getAll()

      Returns a map containing all the pools in this manager. The keys are pool names and the values are `Pool` instances.

      The map contains the pools that this manager knows of at the time of this call. The map is free to be changed without affecting this manager.

      Returns:
        a Map that is a snapshot of all the pools currently known to this manager.

    - #### close

          public static void close(boolean keepAlive)

      Unconditionally destroys all created pools that are in this manager.
      Parameters:
        `keepAlive` - whether the server should keep the durable client's subscriptions alive for the `durable-client-timeout`.
      See Also:
        `for a description of `durable-client-timeout`.`

    - #### find

          public static Pool find(Region<?,?> region)

      Find the pool used by the given region.
      Parameters:
        `region` - The region that is using the pool.
      Returns:
        the pool used by that region or `null` if the region does not have a pool.

    - #### close

          public static void close()

      Unconditionally destroys all created pools that are in this manager.