public abstract class ForwardingCacheEntry<K,V> extends Object implements CacheEntry<K,V>
Constructor and Description |
---|
ForwardingCacheEntry() |
Modifier and Type | Method and Description |
---|---|
CacheEntry<K,V> |
clone() |
void |
commit(DataContainer container)
Commits changes
|
protected abstract CacheEntry<K,V> |
delegate() |
boolean |
equals(Object obj) |
long |
getCreated() |
K |
getKey()
Retrieves the key to this entry
|
long |
getLastUsed() |
long |
getLifespan() |
long |
getMaxIdle() |
Metadata |
getMetadata()
Get metadata of this cache entry.
|
V |
getValue()
Retrieves the value of this entry
|
int |
hashCode() |
boolean |
isChanged() |
boolean |
isCreated() |
boolean |
isEvicted() |
boolean |
isNull()
Tests whether the entry represents a null value, typically used for repeatable read.
|
boolean |
isRemoved() |
void |
setChanged(boolean changed) |
void |
setCreated(boolean created) |
void |
setEvicted(boolean evicted) |
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
void |
setRemoved(boolean removed) |
void |
setSkipLookup(boolean skipLookup)
|
V |
setValue(V value)
Sets the value of the entry, returning the previous value
|
boolean |
skipLookup() |
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
getInternalMetadata, setCreated, setInternalMetadata, setLastUsed
comparingByKey, comparingByKey, comparingByValue, comparingByValue
protected abstract CacheEntry<K,V> delegate()
public boolean isNull()
CacheEntry
isNull
in interface CacheEntry<K,V>
public boolean isChanged()
isChanged
in interface CacheEntry<K,V>
public boolean isCreated()
isCreated
in interface CacheEntry<K,V>
public boolean isRemoved()
isRemoved
in interface CacheEntry<K,V>
public boolean isEvicted()
isEvicted
in interface CacheEntry<K,V>
public K getKey()
CacheEntry
public V getValue()
CacheEntry
public long getLifespan()
getLifespan
in interface CacheEntry<K,V>
public long getMaxIdle()
getMaxIdle
in interface CacheEntry<K,V>
public boolean skipLookup()
skipLookup
in interface CacheEntry<K,V>
true
if the value must not be fetch from an external sourcepublic V setValue(V value)
CacheEntry
public void commit(DataContainer container)
CacheEntry
commit
in interface CacheEntry<K,V>
container
- data container to commit topublic void setChanged(boolean changed)
setChanged
in interface CacheEntry<K,V>
public void setCreated(boolean created)
setCreated
in interface CacheEntry<K,V>
public void setRemoved(boolean removed)
setRemoved
in interface CacheEntry<K,V>
public void setEvicted(boolean evicted)
setEvicted
in interface CacheEntry<K,V>
public void setSkipLookup(boolean skipLookup)
CacheEntry
setSkipLookup
in interface CacheEntry<K,V>
public CacheEntry<K,V> clone()
public Metadata getMetadata()
MetadataAware
getMetadata
in interface MetadataAware
public void setMetadata(Metadata metadata)
MetadataAware
setMetadata
in interface MetadataAware
metadata
- to apply to the cache entrypublic long getCreated()
getCreated
in interface CacheEntry<K,V>
public long getLastUsed()
getLastUsed
in interface CacheEntry<K,V>
public boolean equals(Object obj)
Copyright © 2021 JBoss by Red Hat. All rights reserved.