K
- the type of key.V
- the type of value.public class CacheEntryProcessorEntry<K,V,R extends CacheRecord> extends Object implements javax.cache.processor.MutableEntry<K,V>
MutableEntry
which is provided into
EntryProcessor.process(javax.cache.processor.MutableEntry, Object...)
.
CacheEntryProcessorEntry may face multiple mutating operations like setValue, remove or CacheLoading, etc.
This implementation may handle multiple operations executed on this entry and persist the resultant state into
CacheRecordStore
after entry processor get completed.
EntryProcessor.process(javax.cache.processor.MutableEntry, Object...)
Modifier and Type | Class and Description |
---|---|
protected static class |
CacheEntryProcessorEntry.State |
Modifier and Type | Field and Description |
---|---|
protected AbstractCacheRecordStore |
cacheRecordStore |
protected int |
completionId |
protected javax.cache.expiry.ExpiryPolicy |
expiryPolicy |
protected K |
key |
protected Data |
keyData |
protected long |
now |
protected R |
record |
protected R |
recordLoaded |
protected long |
start |
protected CacheEntryProcessorEntry.State |
state |
protected V |
value |
protected V |
valueLoaded |
Constructor and Description |
---|
CacheEntryProcessorEntry(Data keyData,
R record,
AbstractCacheRecordStore cacheRecordStore,
long now,
int completionId) |
Modifier and Type | Method and Description |
---|---|
void |
applyChanges()
Provides a similar functionality as committing a transaction.
|
boolean |
exists() |
K |
getKey() |
R |
getRecord() |
protected V |
getRecordValue(R record) |
V |
getValue() |
protected void |
onCreate(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
long now,
boolean disableWriteThrough,
int completionId,
boolean saved) |
protected void |
onLoad(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
long now,
boolean disableWriteThrough,
int completionId,
boolean saved) |
protected void |
onRemove(Data key,
String source,
int completionId,
boolean removed) |
protected void |
onUpdate(Data key,
Object value,
R record,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
long now,
boolean disableWriteThrough,
int completionId,
boolean saved) |
void |
remove() |
void |
setValue(V value) |
<T> T |
unwrap(Class<T> clazz) |
protected K key
protected V value
protected CacheEntryProcessorEntry.State state
protected final Data keyData
protected R extends CacheRecord record
protected R extends CacheRecord recordLoaded
protected V valueLoaded
protected final AbstractCacheRecordStore cacheRecordStore
protected final long now
protected final long start
protected final javax.cache.expiry.ExpiryPolicy expiryPolicy
protected final int completionId
public CacheEntryProcessorEntry(Data keyData, R record, AbstractCacheRecordStore cacheRecordStore, long now, int completionId)
public boolean exists()
public void remove()
public void setValue(V value)
public V getValue()
public R getRecord()
public void applyChanges()
CacheRecordStore
.protected void onCreate(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, long now, boolean disableWriteThrough, int completionId, boolean saved)
protected void onLoad(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, long now, boolean disableWriteThrough, int completionId, boolean saved)
protected void onUpdate(Data key, Object value, R record, javax.cache.expiry.ExpiryPolicy expiryPolicy, long now, boolean disableWriteThrough, int completionId, boolean saved)
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.