public class LatestAccessCacheMergePolicy extends Object implements StorageTypeAwareCacheMergePolicy
Note: This policy can only be used if the clocks of the nodes are in sync.
Constructor and Description |
---|
LatestAccessCacheMergePolicy() |
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.
|
public Object merge(String cacheName, CacheEntryView mergingEntry, CacheEntryView existingEntry)
CacheMergePolicy
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
merge
in interface CacheMergePolicy
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 © 2021 Hazelcast, Inc.. All Rights Reserved.