On 26 Mar 2010, at 14:47, Mircea Markus wrote:
Hi,
All the methods that support eviction(maxIdle) and expiration(timeToLive) have 3
versions. E.g.
put(k,v, maxIdle, timeToLive);
put(k,v, maxIdle);
put(k,v);
version 2 and 3 delegate to version 1, using default values.
This logic can be re-used in RemoteCache. I'm thinking to create an abstract class
(CacheSupport implements Cache) that would take care of all these delegations and will be
extended by both CacheDelegate and RemoteCacheImple.
Advantage: code re-use and nicer-looking (sexier as one would say) CacheDelegate and
RemoteCacheImpl.
No API changes needed.
Wdyt?
+1, definitely makes sense.
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org