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
public class MetadataImmortalCacheEntry extends ImmortalCacheEntry implements MetadataAware
A form ofImmortalCacheEntrythat isMetadataAware- Since:
- 5.3
- Author:
- Galder ZamarreƱo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetadataImmortalCacheEntry.Externalizer
-
Field Summary
Fields Modifier and Type Field Description protected Metadatametadata-
Fields inherited from class org.infinispan.container.entries.ImmortalCacheEntry
value
-
Fields inherited from class org.infinispan.container.entries.AbstractInternalCacheEntry
key
-
-
Constructor Summary
Constructors Constructor Description MetadataImmortalCacheEntry(Object key, Object value, Metadata metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadatagetMetadata()Get metadata of this cache entry.voidsetMetadata(Metadata metadata)Set the metadata in the cache entry.InternalCacheValuetoInternalCacheValue()Creates a representation of this entry as anInternalCacheValue.StringtoString()-
Methods inherited from class org.infinispan.container.entries.ImmortalCacheEntry
canExpire, clone, getCreated, getExpiryTime, getLastUsed, getLifespan, getMaxIdle, getValue, isExpired, isExpired, reincarnate, reincarnate, setValue, touch, touch
-
Methods inherited from class org.infinispan.container.entries.AbstractInternalCacheEntry
commit, equals, getKey, hashCode, isChanged, isCreated, isEvicted, isL1Entry, isNull, isRemoved, setChanged, setCreated, setEvicted, setRemoved, setSkipLookup, skipLookup
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.container.entries.CacheEntry
commit, isLoaded, isValid, rollback, setCreated, setLastUsed, setLoaded, setValid, undelete
-
Methods inherited from interface org.infinispan.container.entries.InternalCacheEntry
canExpireMaxIdle
-
-
-
-
Field Detail
-
metadata
protected Metadata metadata
-
-
Method Detail
-
getMetadata
public Metadata getMetadata()
Description copied from interface:MetadataAwareGet metadata of this cache entry.- Specified by:
getMetadatain interfaceMetadataAware- Overrides:
getMetadatain classImmortalCacheEntry- Returns:
- a Metadata instance
-
setMetadata
public void setMetadata(Metadata metadata)
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
public InternalCacheValue 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.
-
toString
public String toString()
- Overrides:
toStringin classImmortalCacheEntry
-
-