[infinispan-dev] StoreByValueTest tck test
Galder Zamarreño
galder at redhat.com
Tue Feb 19 11:57:47 EST 2013
On Jan 28, 2013, at 3:01 PM, Dan Berindei <dan.berindei at gmail.com> wrote:
>> </snip>
>>
>> I originally thought that Infinispan's storeAsBinary can be used for this, but apparently not without some additional changes/tweaks. Maybe we need:
>>
>> 1) A new config option for this behaviour. <storeAsBinary defensive="true" /> ?
>> 2) If enabled, maybe use a subclass of MarshalledValue (DefensiveMarshalledValue?) that *always* stores a byte[] and never caches the object representation?
>>
>>
>> I think we'd still need to cache the object instance while the command is executing, otherwise we'll have too many deserializations. But perhaps the new setting could control whether MarshalledValueInterceptor calls MarshalledValue.compact with preferSerializedRepresentation == true instead of false, as it does now.
>
> Well, you will want eager serialisation too, even in local mode. So that would have to be built in. So maybe rather than a MarshalledValue subclass, we really need a MarshalledValueInterceptor subclass. Even easier/better encapsulated. :)
>
>
> That sounds good to me.
^ I gave that a go and worked pretty nicely with minimal changes.
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