public abstract class Pool<T>
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.pool2.impl.GenericObjectPool<T> |
internalPool |
| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
void |
addObjects(int count) |
void |
close() |
protected void |
closeInternalPool() |
void |
destroy() |
long |
getMaxBorrowWaitTimeMillis() |
long |
getMeanBorrowWaitTimeMillis() |
int |
getNumActive() |
int |
getNumIdle() |
int |
getNumWaiters() |
T |
getResource() |
void |
initPool(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
org.apache.commons.pool2.PooledObjectFactory<T> factory) |
boolean |
isClosed() |
private boolean |
poolInactive() |
void |
returnBrokenResource(T resource)
Deprecated.
starting from Jedis 3.0 this method will not be exposed. Resource cleanup should be
done using @see
Jedis.close() |
protected void |
returnBrokenResourceObject(T resource) |
void |
returnResource(T resource)
Deprecated.
starting from Jedis 3.0 this method will not be exposed. Resource cleanup should be
done using @see
Jedis.close() |
void |
returnResourceObject(T resource)
Deprecated.
starting from Jedis 3.0 this method will not be exposed. Resource cleanup should be
done using @see
Jedis.close() |
protected org.apache.commons.pool2.impl.GenericObjectPool<T> internalPool
public Pool()
public Pool(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
org.apache.commons.pool2.PooledObjectFactory<T> factory)
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic boolean isClosed()
public void initPool(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
org.apache.commons.pool2.PooledObjectFactory<T> factory)
public T getResource()
@Deprecated public void returnResourceObject(T resource)
Jedis.close()@Deprecated public void returnBrokenResource(T resource)
Jedis.close()@Deprecated public void returnResource(T resource)
Jedis.close()public void destroy()
protected void returnBrokenResourceObject(T resource)
protected void closeInternalPool()
public int getNumActive()
public int getNumIdle()
public int getNumWaiters()
public long getMeanBorrowWaitTimeMillis()
public long getMaxBorrowWaitTimeMillis()
private boolean poolInactive()
public void addObjects(int count)