Package org.mariadb.jdbc.pool
Class Pools
- java.lang.Object
-
- org.mariadb.jdbc.pool.Pools
-
public final class Pools extends java.lang.ObjectPools
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classPools.PoolHolder
-
Field Summary
Fields Modifier and Type Field Description private static java.util.concurrent.ScheduledThreadPoolExecutorpoolExecutorprivate static java.util.concurrent.atomic.AtomicIntegerpoolIndexprivate static java.util.Map<Configuration,Pools.PoolHolder>poolMap
-
Constructor Summary
Constructors Constructor Description Pools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose()Close all pools and release the driver's shared threads (pool idle checker and query timeout scheduler), so an application server can unload the driver on undeploy.static voidclose(java.lang.String poolName)Closing a pool with name defined in url.static voidremove(Pool pool)Remove pool.static PoolretrievePool(Configuration conf)Get existing pool for a configuration.private static voidshutdownExecutor()
-
-
-
Field Detail
-
poolIndex
private static final java.util.concurrent.atomic.AtomicInteger poolIndex
-
poolMap
private static final java.util.Map<Configuration,Pools.PoolHolder> poolMap
-
poolExecutor
private static java.util.concurrent.ScheduledThreadPoolExecutor poolExecutor
-
-
Method Detail
-
retrievePool
public static Pool retrievePool(Configuration conf)
Get existing pool for a configuration. Create it if it doesn't exist.- Parameters:
conf- configuration parser- Returns:
- pool
-
remove
public static void remove(Pool pool)
Remove pool.- Parameters:
pool- pool to remove
-
close
public static void close()
Close all pools and release the driver's shared threads (pool idle checker and query timeout scheduler), so an application server can unload the driver on undeploy.
-
close
public static void close(java.lang.String poolName)
Closing a pool with name defined in url.- Parameters:
poolName- the option "poolName" value
-
shutdownExecutor
private static void shutdownExecutor()
-
-