redis.clients.util
Class Pool<T>
java.lang.Object
redis.clients.util.Pool<T>
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- JedisPool, JedisSentinelPool, ShardedJedisPool
public abstract class Pool<T>
- extends Object
- implements Closeable
Field Summary |
protected org.apache.commons.pool2.impl.GenericObjectPool<T> |
internalPool
|
Constructor Summary |
Pool()
Using this constructor means you have to set and initialize the
internalPool yourself. |
Pool(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
org.apache.commons.pool2.PooledObjectFactory<T> factory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
internalPool
protected org.apache.commons.pool2.impl.GenericObjectPool<T> internalPool
Pool
public Pool()
- Using this constructor means you have to set and initialize the
internalPool yourself.
Pool
public Pool(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
org.apache.commons.pool2.PooledObjectFactory<T> factory)
close
public void close()
- Specified by:
close
in interface Closeable
isClosed
public boolean isClosed()
initPool
public void initPool(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
org.apache.commons.pool2.PooledObjectFactory<T> factory)
getResource
public T getResource()
returnResourceObject
public void returnResourceObject(T resource)
returnBrokenResource
public void returnBrokenResource(T resource)
returnResource
public void returnResource(T resource)
destroy
public void destroy()
returnBrokenResourceObject
protected void returnBrokenResourceObject(T resource)
closeInternalPool
protected void closeInternalPool()
Copyright © 2014. All rights reserved.