public class MetadataImmortalCacheEntry extends ImmortalCacheEntry implements MetadataAware
ImmortalCacheEntry that
is MetadataAware| Modifier and Type | Class and Description |
|---|---|
static class |
MetadataImmortalCacheEntry.Externalizer |
| Modifier and Type | Field and Description |
|---|---|
protected Metadata |
metadata |
valuekey| Constructor and Description |
|---|
MetadataImmortalCacheEntry(Object key,
Object value,
Metadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
Metadata |
getMetadata()
Get metadata of this cache entry.
|
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
InternalCacheValue |
toInternalCacheValue()
Creates a representation of this entry as an
InternalCacheValue. |
String |
toString() |
canExpire, clone, equals, getCreated, getExpiryTime, getLastUsed, getLifespan, getMaxIdle, getValue, hashCode, isExpired, isExpired, reincarnate, reincarnate, setValue, touch, touchcommit, getKey, isChanged, isCreated, isEvicted, isL1Entry, isLoaded, isNull, isRemoved, isValid, rollback, setChanged, setCreated, setEvicted, setLoaded, setRemoved, setSkipLookup, setValid, skipLookup, undeletefinalize, getClass, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValueprotected Metadata metadata
public Metadata getMetadata()
MetadataAwaregetMetadata in interface MetadataAwaregetMetadata in class ImmortalCacheEntrypublic void setMetadata(Metadata metadata)
MetadataAwaresetMetadata in interface MetadataAwaresetMetadata in class ImmortalCacheEntrymetadata - to apply to the cache entrypublic InternalCacheValue toInternalCacheValue()
InternalCacheEntryInternalCacheValue. The main
purpose of this is to provide a representation that does not have a reference to the key. This is useful in
situations where the key is already known or stored elsewhere, making serialization and deserialization more
efficient.
Note that this should not be used to optimize memory overhead, since the saving of an additional reference to a
key (a single object reference) does not warrant the cost of constructing an InternalCacheValue. This only
makes sense when marshalling is involved, since the cost of marshalling the key again can be sidestepped using an
InternalCacheValue if the key is already known/marshalled.
toInternalCacheValue in interface InternalCacheEntrytoInternalCacheValue in class ImmortalCacheEntrypublic String toString()
toString in class ImmortalCacheEntryCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.