Class CoherenceCacheEntry<K,V>

java.lang.Object
com.tangosol.coherence.jcache.common.CoherenceCacheEntry<K,V>
Type Parameters:
K - the type of keys
V - the type of values
All Implemented Interfaces:
javax.cache.Cache.Entry<K,V>

public class CoherenceCacheEntry<K,V> extends Object implements javax.cache.Cache.Entry<K,V>
A Cache.Entry implementation.
Since:
Coherence 12.1.3
Author:
jf 2014.11.06
  • Constructor Details

    • CoherenceCacheEntry

      public CoherenceCacheEntry(Map.Entry<K,V> entry)
      Constructs a CoherenceCacheEntry given a Map.Entry.
      Parameters:
      entry - the entry
    • CoherenceCacheEntry

      public CoherenceCacheEntry(K key, V value)
      Constructs a CoherenceCacheEntry given a key and value
      Parameters:
      key - the key of the entry
      value - the value of the entry
    • CoherenceCacheEntry

      public CoherenceCacheEntry(K key, V value, V oldValue)
      Constructs a CoherenceCacheEntry given a key, value and previous value.
      Parameters:
      key - the key of the entry
      value - the value of the entry
      oldValue - the previous value of the entry
  • Method Details

    • getKey

      public K getKey()
      Specified by:
      getKey in interface javax.cache.Cache.Entry<K,V>
    • getValue

      public V getValue()
      Specified by:
      getValue in interface javax.cache.Cache.Entry<K,V>
    • unwrap

      public <T> T unwrap(Class<T> clazz)
      Specified by:
      unwrap in interface javax.cache.Cache.Entry<K,V>
    • getOldValue

      public V getOldValue()
      Obtains the old value for the entry.
      Returns:
      the old value of the entry or null if one is not defined
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object