[infinispan-dev] Implications of adding put with metadata (ISPN-2281)

Galder Zamarreño galder at redhat.com
Fri Apr 26 09:58:59 EDT 2013


Hi all,

Looking at the pull req for ISPN-2281, I'm adding methods like this to AdvancedCache:

V put(K key, V value, Metadata metadata);

Now, I think that adding this should deprecate these methods:

V put(K key, V value, long lifespan, TimeUnit unit);
V put(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit);

But these two are located in BasicCache, and if we end up removing them eventually, it'd mean that either:
a) users need to use advanced cache even for adding lifespan
b) put(k, v, metadata) gets promoted to BasicCache

I don't like either option tbh. BasicCache might be implemented by users or AS guys, which until we have JDK8 (in year 2048 :p), will break existing clients, and not happy for people to get hold of AdvancedCache for use cases where they didn't need before.

Cheers,
--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz

Project Lead, Escalante
http://escalante.io

Engineer, Infinispan
http://infinispan.org




More information about the infinispan-dev mailing list