VMware GemFire Java API Reference
Package org.apache.geode.cache.client
Class PoolManager
- java.lang.Object
-
- org.apache.geode.cache.client.PoolManager
-
public final class PoolManager extends java.lang.ObjectManages creation and access toconnection poolsfor 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 Description static voidclose()Unconditionally destroys all created pools that are in this manager.static voidclose(boolean keepAlive)Unconditionally destroys all created pools that are in this manager.static PoolFactorycreateFactory()Creates a newpool factory, which is used to configure and create newPools.static Poolfind(java.lang.String name)Find by name an existing connection pool returning the existing pool ornullif it does not exist.static Poolfind(Region<?,?> region)Find the pool used by the given region.static java.util.Map<java.lang.String,Pool>getAll()Returns a map containing all the pools in this manager.
-
-
-
Method Detail
-
createFactory
public static PoolFactory createFactory()
Creates a newpool factory, which is used to configure and create newPools.- Returns:
- the new pool factory
-
find
public static Pool find(java.lang.String name)
Find by name an existing connection pool returning the existing pool ornullif it does not exist.- Parameters:
name- the name of the connection pool- Returns:
- the existing connection pool or
nullif it does not exist.
-
getAll
public static java.util.Map<java.lang.String,Pool> getAll()
Returns a map containing all the pools in this manager. The keys are pool names and the values arePoolinstances.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 thedurable-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
nullif the region does not have a pool.
-
close
public static void close()
Unconditionally destroys all created pools that are in this manager.
-
-