redis.clients.util
Class Pool<T>

java.lang.Object
  extended by redis.clients.util.Pool<T>
Direct Known Subclasses:
JedisPool, JedisSentinelPool, ShardedJedisPool

public abstract class Pool<T>
extends Object


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)
           
 
Method Summary
protected  void closeInternalPool()
           
 void destroy()
           
 T getResource()
           
 void initPool(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, org.apache.commons.pool2.PooledObjectFactory<T> factory)
           
 void returnBrokenResource(T resource)
           
protected  void returnBrokenResourceObject(T resource)
           
 void returnResource(T resource)
           
 void returnResourceObject(T resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

internalPool

protected org.apache.commons.pool2.impl.GenericObjectPool<T> internalPool
Constructor Detail

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)
Method Detail

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 © 2013. All rights reserved.