Class MetadataImmortalCacheEntry
java.lang.Object
org.infinispan.container.entries.AbstractInternalCacheEntry
org.infinispan.container.entries.ImmortalCacheEntry
org.infinispan.container.entries.metadata.MetadataImmortalCacheEntry
- All Implemented Interfaces:
Cloneable
,Map.Entry
,CacheEntry
,InternalCacheEntry
,MetadataAware
A form of
ImmortalCacheEntry
that is MetadataAware
- Since:
- 5.3
- Author:
- Galder ZamarreƱo
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.infinispan.container.entries.AbstractInternalCacheEntry
internalMetadata, key, value
-
Constructor Summary
ModifierConstructorDescriptionprotected
MetadataImmortalCacheEntry
(Object key, Object value, PrivateMetadata internalMetadata, Metadata metadata) MetadataImmortalCacheEntry
(Object key, Object value, Metadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendFieldsToString
(StringBuilder builder) Get metadata of this cache entry.void
setMetadata
(Metadata metadata) Set the metadata in the cache entry.Creates a representation of this entry as anInternalCacheValue
.Methods inherited from class org.infinispan.container.entries.ImmortalCacheEntry
canExpire, clone, getCreated, getExpiryTime, getLastUsed, getLifespan, getMaxIdle, isExpired, reincarnate, touch
Methods inherited from class org.infinispan.container.entries.AbstractInternalCacheEntry
commit, equals, getInternalMetadata, getKey, getValue, hashCode, isChanged, isCreated, isEvicted, isL1Entry, isNull, isRemoved, setChanged, setCreated, setEvicted, setInternalMetadata, setRemoved, setSkipLookup, setValue, skipLookup, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.container.entries.CacheEntry
setCreated, setLastUsed
Methods inherited from interface org.infinispan.container.entries.InternalCacheEntry
canExpireMaxIdle
-
Field Details
-
metadata
-
-
Constructor Details
-
MetadataImmortalCacheEntry
-
MetadataImmortalCacheEntry
protected MetadataImmortalCacheEntry(Object key, Object value, PrivateMetadata internalMetadata, Metadata metadata)
-
-
Method Details
-
getMetadata
Description copied from interface:MetadataAware
Get metadata of this cache entry.- Specified by:
getMetadata
in interfaceMetadataAware
- Overrides:
getMetadata
in classImmortalCacheEntry
- Returns:
- a Metadata instance
-
setMetadata
Description copied from interface:MetadataAware
Set the metadata in the cache entry.- Specified by:
setMetadata
in interfaceMetadataAware
- Overrides:
setMetadata
in classImmortalCacheEntry
- Parameters:
metadata
- to apply to the cache entry
-
toInternalCacheValue
Description copied from interface:InternalCacheEntry
Creates a representation of this entry as anInternalCacheValue
. 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.- Specified by:
toInternalCacheValue
in interfaceInternalCacheEntry
- Overrides:
toInternalCacheValue
in classImmortalCacheEntry
- Returns:
- a new InternalCacheValue encapsulating this InternalCacheEntry's value and expiration information.
-
appendFieldsToString
- Overrides:
appendFieldsToString
in classAbstractInternalCacheEntry
-