Closes #656. Add a getNumActive() method to JedisPool to provide access to the current state of the internal pool.

This commit is contained in:
Ethan Urie
2014-09-02 14:54:36 -04:00
parent ebaba79119
commit a201e29d88
2 changed files with 39 additions and 0 deletions

View File

@@ -98,4 +98,12 @@ public class JedisPool extends Pool<Jedis> {
returnResourceObject(resource);
}
}
public int getNumActive() {
if (this.internalPool == null || this.internalPool.isClosed()) {
return -1;
}
return this.internalPool.getNumActive();
}
}