package org.apache.commons.pool; public interface KeyedObjectPool { void addObject(Object obj) throws Exception; Object borrowObject(Object obj) throws Exception; void clear() throws Exception, UnsupportedOperationException; void clear(Object obj) throws Exception, UnsupportedOperationException; void close() throws Exception; int getNumActive() throws UnsupportedOperationException; int getNumActive(Object obj) throws UnsupportedOperationException; int getNumIdle() throws UnsupportedOperationException; int getNumIdle(Object obj) throws UnsupportedOperationException; void invalidateObject(Object obj, Object obj2) throws Exception; void returnObject(Object obj, Object obj2) throws Exception; void setFactory(KeyedPoolableObjectFactory keyedPoolableObjectFactory) throws IllegalStateException, UnsupportedOperationException; }