public final class PoolUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
PoolUtils.PoolWork<T,V>
A unit of work that utilizes a pooled resource.
|
| Modifier and Type | Method and Description |
|---|---|
static redis.clients.util.Pool<redis.clients.jedis.Jedis> |
createJedisPool(Config jesqueConfig)
A simple helper method that creates a pool of connections to Redis using the supplied Config and the default pool config.
|
static redis.clients.util.Pool<redis.clients.jedis.Jedis> |
createJedisPool(Config jesqueConfig,
org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
A simple helper method that creates a pool of connections to Redis using the supplied configurations.
|
static <T,V> V |
doWorkInPool(redis.clients.util.Pool<T> pool,
PoolUtils.PoolWork<T,V> work) |
static <T,V> V |
doWorkInPoolNicely(redis.clients.util.Pool<T> pool,
PoolUtils.PoolWork<T,V> work) |
static org.apache.commons.pool.impl.GenericObjectPool.Config |
getDefaultPoolConfig() |
public static <T,V> V doWorkInPool(redis.clients.util.Pool<T> pool,
PoolUtils.PoolWork<T,V> work)
throws Exception
Exceptionpublic static <T,V> V doWorkInPoolNicely(redis.clients.util.Pool<T> pool,
PoolUtils.PoolWork<T,V> work)
public static org.apache.commons.pool.impl.GenericObjectPool.Config getDefaultPoolConfig()
public static redis.clients.util.Pool<redis.clients.jedis.Jedis> createJedisPool(Config jesqueConfig)
jesqueConfig - the config used to create the pooled Jedis connectionpublic static redis.clients.util.Pool<redis.clients.jedis.Jedis> createJedisPool(Config jesqueConfig, org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
jesqueConfig - the config used to create the pooled Jedis connectionspoolConfig - the config used to create the poolCopyright © 2011-2013. All Rights Reserved.