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
Nested Classes -
Field Summary
FieldsFields inherited from class org.infinispan.container.entries.AbstractInternalCacheEntry
internalMetadata, key, value -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMetadataImmortalCacheEntry(Object key, Object value, PrivateMetadata internalMetadata, Metadata metadata) MetadataImmortalCacheEntry(Object key, Object value, Metadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendFieldsToString(StringBuilder builder) Get metadata of this cache entry.voidsetMetadata(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, touchMethods 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, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.container.entries.CacheEntry
setCreated, setLastUsedMethods 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:MetadataAwareGet metadata of this cache entry.- Specified by:
getMetadatain interfaceMetadataAware- Overrides:
getMetadatain classImmortalCacheEntry- Returns:
- a Metadata instance
-
setMetadata
Description copied from interface:MetadataAwareSet the metadata in the cache entry.- Specified by:
setMetadatain interfaceMetadataAware- Overrides:
setMetadatain classImmortalCacheEntry- Parameters:
metadata- to apply to the cache entry
-
toInternalCacheValue
Description copied from interface:InternalCacheEntryCreates 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:
toInternalCacheValuein interfaceInternalCacheEntry- Overrides:
toInternalCacheValuein classImmortalCacheEntry- Returns:
- a new InternalCacheValue encapsulating this InternalCacheEntry's value and expiration information.
-
appendFieldsToString
- Overrides:
appendFieldsToStringin classAbstractInternalCacheEntry
-