Package org.infinispan.util
Class EntryWrapper<K,V>
java.lang.Object
org.infinispan.container.entries.ForwardingCacheEntry<K,V>
org.infinispan.util.EntryWrapper<K,V>
- Type Parameters:
K
- The key typeV
- The value type
- All Implemented Interfaces:
Cloneable
,Map.Entry<K,
,V> CacheEntry<K,
,V> MetadataAware
Wrapper for CacheEntry(s) that can be used to update the cache when it's value is set.
-
Constructor Summary
ConstructorDescriptionEntryWrapper
(Cache<K, V> cache, CacheEntry<K, V> entry) Creates a new entry wrapper given the cache and entry. -
Method Summary
Methods inherited from class org.infinispan.container.entries.ForwardingCacheEntry
clone, commit, equals, getCreated, getKey, getLastUsed, getLifespan, getMaxIdle, getMetadata, getValue, hashCode, isChanged, isCreated, isEvicted, isNull, isRemoved, setChanged, setCreated, setEvicted, setMetadata, setRemoved, setSkipLookup, 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
getInternalMetadata, setCreated, setInternalMetadata, setLastUsed
-
Constructor Details
-
EntryWrapper
Creates a new entry wrapper given the cache and entry. If the entry is itself an EntryWrapper then the inner entry is instead wrapped to prevent double cache.put operations. Also we then we can use the cache given as this could have different flags etc.- Parameters:
cache
- the cache to use on setValueentry
- the actual entry
-
-
Method Details
-
delegate
- Specified by:
delegate
in classForwardingCacheEntry<K,
V>
-
setValue
Description copied from interface:CacheEntry
Sets the value of the entry, returning the previous value
-