Merge branch 'Issue171' of git://github.com/ivowiblo/jedis into ivowiblo-issue171
This commit is contained in:
@@ -38,6 +38,15 @@ public class JedisPool extends Pool<Jedis> {
|
||||
super(poolConfig, new JedisFactory(host, port, timeout, password, database));
|
||||
}
|
||||
|
||||
|
||||
public void returnBrokenResource(final BinaryJedis resource) {
|
||||
returnBrokenResourceObject(resource);
|
||||
}
|
||||
|
||||
public void returnResource(final BinaryJedis resource) {
|
||||
returnResourceObject(resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* PoolableObjectFactory custom impl.
|
||||
*/
|
||||
@@ -101,6 +110,5 @@ public class JedisPool extends Pool<Jedis> {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ public abstract class Pool<T> {
|
||||
"Could not get a resource from the pool", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void returnResource(final T resource) {
|
||||
|
||||
public void returnResourceObject(final Object resource) {
|
||||
try {
|
||||
internalPool.returnObject(resource);
|
||||
} catch (Exception e) {
|
||||
@@ -32,8 +32,16 @@ public abstract class Pool<T> {
|
||||
"Could not return the resource to the pool", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void returnBrokenResource(final T resource) {
|
||||
returnBrokenResourceObject(resource);
|
||||
}
|
||||
|
||||
public void returnResource(final T resource) {
|
||||
returnResourceObject(resource);
|
||||
}
|
||||
|
||||
protected void returnBrokenResourceObject(final Object resource) {
|
||||
try {
|
||||
internalPool.invalidateObject(resource);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user