public interface StorageTypeAwareCacheMergePolicy extends CacheMergePolicy
Marker interface for indicating that key and value wrapped by
CacheEntryView
will be not converted to their original types.
The motivation of this interface is that generally while merging cache entries, actual key and value is not checked. So no need to convert them to their original types.
At worst case, value is returned from the merge method as selected and this means that at all cases
value is accessed. So even the the convertion is done as lazy, it will be processed at this point.
But by default, they (key and value) converted to their original types
unless this StorageTypeAwareCacheMergePolicy
is used.
Another motivation for using this interface is that at server side
there is no need to locate classes of stored entries.
It means that entries can be put from client with `BINARY` in-memory format and
classpath of client can be different from server.
So in this case, if entries are tried to convert to their original types while merging,
ClassNotFoundException
is thrown here.
As a result, both of performance and ClassNotFoundException
as mentioned above,
it is strongly recommended to use this interface if original values of key and values are not needed.
CacheMergePolicy
merge
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.