public abstract class AbstractInternalCacheEntry extends Object implements InternalCacheEntry
Modifier and Type | Field and Description |
---|---|
protected PrivateMetadata |
internalMetadata |
protected Object |
key |
protected Object |
value |
Modifier | Constructor and Description |
---|---|
protected |
AbstractInternalCacheEntry(Object key,
Object value,
PrivateMetadata internalMetadata) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendFieldsToString(StringBuilder builder) |
AbstractInternalCacheEntry |
clone() |
void |
commit(DataContainer container)
Commits changes
|
boolean |
equals(Object o) |
PrivateMetadata |
getInternalMetadata() |
Object |
getKey()
Retrieves the key to this entry
|
Metadata |
getMetadata()
Get metadata of this cache entry.
|
Object |
getValue()
Retrieves the value of this entry
|
int |
hashCode() |
boolean |
isChanged() |
boolean |
isCreated() |
boolean |
isEvicted() |
boolean |
isL1Entry() |
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 |
setInternalMetadata(PrivateMetadata metadata) |
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
void |
setRemoved(boolean removed) |
void |
setSkipLookup(boolean skipLookup)
|
Object |
setValue(Object value)
Sets the value of the entry, returning the previous value
|
boolean |
skipLookup() |
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
canExpire, canExpireMaxIdle, getExpiryTime, isExpired, reincarnate, toInternalCacheValue, touch
getCreated, getLastUsed, getLifespan, getMaxIdle, setCreated, setLastUsed
comparingByKey, comparingByKey, comparingByValue, comparingByValue
protected Object key
protected Object value
protected PrivateMetadata internalMetadata
protected AbstractInternalCacheEntry(Object key, Object value, PrivateMetadata internalMetadata)
public final void commit(DataContainer container)
CacheEntry
commit
in interface CacheEntry
container
- data container to commit topublic void setChanged(boolean changed)
setChanged
in interface CacheEntry
public final void setCreated(boolean created)
setCreated
in interface CacheEntry
public final void setRemoved(boolean removed)
setRemoved
in interface CacheEntry
public final void setEvicted(boolean evicted)
setEvicted
in interface CacheEntry
public void setSkipLookup(boolean skipLookup)
CacheEntry
setSkipLookup
in interface CacheEntry
public final boolean isNull()
CacheEntry
isNull
in interface CacheEntry
public final boolean isChanged()
isChanged
in interface CacheEntry
public final boolean isCreated()
isCreated
in interface CacheEntry
public final boolean isRemoved()
isRemoved
in interface CacheEntry
public final boolean isEvicted()
isEvicted
in interface CacheEntry
public boolean skipLookup()
skipLookup
in interface CacheEntry
true
if the value must not be fetch from an external sourcepublic Metadata getMetadata()
MetadataAware
getMetadata
in interface MetadataAware
public void setMetadata(Metadata metadata)
MetadataAware
setMetadata
in interface MetadataAware
metadata
- to apply to the cache entrypublic final Object getKey()
CacheEntry
getKey
in interface Map.Entry
getKey
in interface CacheEntry
public final Object getValue()
CacheEntry
getValue
in interface Map.Entry
getValue
in interface CacheEntry
public final Object setValue(Object value)
CacheEntry
setValue
in interface Map.Entry
setValue
in interface CacheEntry
value
- value to setpublic boolean isL1Entry()
isL1Entry
in interface InternalCacheEntry
true
if the entry is a L1 entry.public final PrivateMetadata getInternalMetadata()
getInternalMetadata
in interface CacheEntry
public final void setInternalMetadata(PrivateMetadata metadata)
setInternalMetadata
in interface CacheEntry
public AbstractInternalCacheEntry clone()
clone
in interface CacheEntry
clone
in interface InternalCacheEntry
clone
in class Object
public final boolean equals(Object o)
public final int hashCode()
protected void appendFieldsToString(StringBuilder builder)
Copyright © 2021 JBoss by Red Hat. All rights reserved.