commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent Worden <>
Subject [POOL] generics on KeyedObjectPool
Date Tue, 12 Oct 2010 13:29:07 GMT
   The javadoc on KeyedObjectPool states 'A keyed pool pools instances 
of multiple types.'  However, the new parametrization on KeyedObjectPool 
allows for only a single instance type.

To allow for pooling multiple typed instances, should the instance type 
parameter be removed from the interface declaration and placed on the 
relevant method declarations?  In other words, replace:

public interface KeyedObjectPool<K,V> {


public interface KeyedObjectPool<K> {

<V> V borrowObject(K key);

<V> void invalidateObject(K key, V obj);

<V> void returnObject(K key, V obj);



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message