Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-26 Thread Galder Zamarreño
On Apr 8, 2013, at 6:59 PM, Tristan Tarrant ttarr...@redhat.com wrote: On 04/08/2013 06:51 PM, Galder Zamarreño wrote: ^ That's certainly an option, but it's gotta be extensible (and retrievable), so that server's can build on top of it. For example, REST server might wanna add MIME

[infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Galder Zamarreño
Hi all, As mentioned in http://lists.jboss.org/pipermail/infinispan-dev/2013-March/012348.html, in paralell to the switch to Equivalent* collections, I was also working on being able to pass metadata into Infinispan caches. This is done to better support the ability to store custom metadata

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Galder Zamarreño
On Apr 8, 2013, at 11:17 AM, Manik Surtani msurt...@redhat.com wrote: All sounds very good. One important thing to consider is that the reference to Metadata passed in by the client app will be tied to the ICE for the entire lifespan of the ICE. You'll need to think about a defensive copy

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Galder Zamarreño
On Apr 8, 2013, at 12:35 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 11:17 AM, Manik Surtani msurt...@redhat.com wrote: All sounds very good. One important thing to consider is that the reference to Metadata passed in by the client app will be tied to the ICE for the

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Sanne Grinovero
On 8 April 2013 11:44, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 12:35 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 11:17 AM, Manik Surtani msurt...@redhat.com wrote: All sounds very good. One important thing to consider is that the reference to

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Dan Berindei
On Mon, Apr 8, 2013 at 1:44 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 12:35 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 11:17 AM, Manik Surtani msurt...@redhat.com wrote: All sounds very good. One important thing to consider is that the

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Sanne Grinovero
On 8 April 2013 12:06, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 12:56 PM, Sanne Grinovero sa...@infinispan.org wrote: On 8 April 2013 11:44, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 12:35 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8,

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Galder Zamarreño
On Apr 8, 2013, at 1:11 PM, Dan Berindei dan.berin...@gmail.com wrote: On Mon, Apr 8, 2013 at 1:44 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 12:35 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 11:17 AM, Manik Surtani msurt...@redhat.com

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Galder Zamarreño
On Apr 8, 2013, at 1:26 PM, Sanne Grinovero sa...@infinispan.org wrote: On 8 April 2013 12:06, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 12:56 PM, Sanne Grinovero sa...@infinispan.org wrote: On 8 April 2013 11:44, Galder Zamarreño gal...@redhat.com wrote: On

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Sanne Grinovero
I fail to understand the purpose of the feature then. What prevents me to use the existing code today just storing some extra fields in my custom values? What do we get by adding this code? Sanne On 8 April 2013 12:40, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 1:26 PM, Sanne

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Dan Berindei
On Mon, Apr 8, 2013 at 2:36 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 1:11 PM, Dan Berindei dan.berin...@gmail.com wrote: On Mon, Apr 8, 2013 at 1:44 PM, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 12:35 PM, Galder Zamarreño

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Galder Zamarreño
On Apr 8, 2013, at 1:46 PM, Sanne Grinovero sa...@infinispan.org wrote: I fail to understand the purpose of the feature then. What prevents me to use the existing code today just storing some extra fields in my custom values? ^ Nothing, this is doable. What do we get by adding this code?

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Sanne Grinovero
Got it, thanks! +1 especially as it helps bringing tombstones, an urgent feature IMHO. Sanne On 8 April 2013 13:11, Galder Zamarreño gal...@redhat.com wrote: On Apr 8, 2013, at 1:46 PM, Sanne Grinovero sa...@infinispan.org wrote: I fail to understand the purpose of the feature then. What

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Galder Zamarreño
On Apr 8, 2013, at 4:09 PM, Manik Surtani msurt...@redhat.com wrote: Tombstones as well as external versioning - something Hibernate 2LC has needed for a while (and Max doesn't ever stop bugging me about!) Re: the serialisability, how about this: why make Metadata in interface? Why not

Re: [infinispan-dev] AdvancedCache.put with Metadata parameter

2013-04-08 Thread Tristan Tarrant
On 04/08/2013 06:51 PM, Galder Zamarreño wrote: ^ That's certainly an option, but it's gotta be extensible (and retrievable), so that server's can build on top of it. For example, REST server might wanna add MIME info on top of it. It's got to be able to extend Metadata concrete class, so