Wrapper that wraps cached data, providing lazy deserialization using the calling thread's context class loader.
The {@link org.infinispan.interceptors.MarshalledValueInterceptor} handles transparent wrapping/unwrapping of cacheddata.
NOTE: the equals() method of this class will either compare binary representations (byte arrays) or delegate to the wrapped instance's equals() method, depending on whether both instances being compared are in serialized or deserialized form. If one of the instances being compared is in one form and the other in another form, then one instance is either serialized or deserialized, the preference will be to compare object representations, unless the instance is {@link #compact(boolean,boolean)}ed and a preference is set accordingly.
Note also that this will affect the way keys stored in the cache will work, if storeAsBinary is used, since comparisons happen on the key which will be wrapped by a {@link MarshalledValue}. Implementers of equals() methods of their keys need to be aware of this.
@author Manik Surtani (manik@jboss.org)
@author Mircea.Markus@jboss.com
@author Galder Zamarreño
@author Sanne Grinovero
@see org.infinispan.interceptors.MarshalledValueInterceptor
@since 4.0