public class LatestAccessCacheMergePolicy extends Object implements StorageTypeAwareCacheMergePolicy
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.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public Object merge(String cacheName, CacheEntryView mergingEntry, CacheEntryView existingEntry)
CacheMergePolicy
Selects one of the merging and existing cache entries to be merged.
Note that as mentioned also in arguments, the CacheEntryView
instance that represents existing cache entry
may be null if there is no existing entry for the specified key in the the CacheEntryView
instance
that represents merging cache entry.
merge
in interface CacheMergePolicy
cacheName
- name of the cachemergingEntry
- CacheEntryView
instance that has cache entry to be mergedexistingEntry
- CacheEntryView
instance that has existing cache entry.
This entry may be null
if there is no existing cache entry.public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.