public class GridCacheVersionConflictContext<K,V> extends Object
| Constructor and Description |
|---|
GridCacheVersionConflictContext(CacheObjectValueContext ctx,
GridCacheVersionedEntry<K,V> oldEntry,
GridCacheVersionedEntry<K,V> newEntry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
expireTime() |
boolean |
isManualResolve() |
boolean |
isMerge() |
boolean |
isUseNew() |
boolean |
isUseOld() |
void |
manualResolve()
Set manual resolve class.
|
void |
merge(V mergeVal,
long ttl)
Force cache to use neither old, nor new, but some other value passed as argument.
|
V |
mergeValue() |
GridCacheVersionedEntry<K,V> |
newEntry()
Gets new cache entry.
|
GridCacheVersionedEntry<K,V> |
oldEntry()
Gets old (existing) cache entry.
|
String |
toString() |
long |
ttl() |
void |
useNew()
Force cache to apply new entry overwriting old (existing) entry.
|
void |
useOld()
Force cache to ignore new entry and leave old (existing) entry unchanged.
|
CacheObjectValueContext |
valueContext()
Gets cache object context.
|
public GridCacheVersionConflictContext(CacheObjectValueContext ctx, GridCacheVersionedEntry<K,V> oldEntry, GridCacheVersionedEntry<K,V> newEntry)
oldEntry - Old entry.newEntry - New entry.public GridCacheVersionedEntry<K,V> oldEntry()
public GridCacheVersionedEntry<K,V> newEntry()
public CacheObjectValueContext valueContext()
public void useOld()
public void useNew()
public void merge(@Nullable
V mergeVal,
long ttl)
Also in case of merge you have to specify new TTL explicitly. For unlimited TTL use 0.
mergeVal - Merge value or null to force remove.ttl - Time to live in milliseconds (must be non-negative).public boolean isUseOld()
True in case old value should be used.public boolean isUseNew()
True in case new value should be used.public boolean isMerge()
True in case merge is to be performed.public void manualResolve()
public boolean isManualResolve()
@Nullable public V mergeValue()
public long ttl()
public long expireTime()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018