public interface CacheMergePolicy extends Serializable
Passed CacheEntryView
instances wrap the key and value as their original types
with conversion to object from their storage types. If you don't need the original types
of key and value, you should use StorageTypeAwareCacheMergePolicy
which is
a sub-type of this interface.
Modifier and Type | Method and Description |
---|---|
Object |
merge(String cacheName,
CacheEntryView mergingEntry,
CacheEntryView existingEntry)
Selects one of the merging and existing cache entries to be merged.
|
Object merge(String cacheName, CacheEntryView mergingEntry, CacheEntryView existingEntry)
Note that the existingEntry
may be null
if there
is no entry with the same key in the destination cache.
This happens, when the entry for that key was
cacheName
- name of the cachemergingEntry
- CacheEntryView
instance that has the cache entry to be mergedexistingEntry
- CacheEntryView
instance that has the existing cache entry
or null
if there is no existing cache entrynull
if the entry should be removedCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.