Class ClearCacheEntry<K,V>

java.lang.Object
org.infinispan.container.entries.ClearCacheEntry<K,V>
All Implemented Interfaces:
Cloneable, Map.Entry<K,V>, CacheEntry<K,V>, MetadataAware

public class ClearCacheEntry<K,V> extends Object implements CacheEntry<K,V>
Used in ClearInvocationContext to process the ClearCommand.
Since:
7.2
Author:
Pedro Ruivo
  • Method Details

    • getInstance

      public static <K, V> ClearCacheEntry<K,V> getInstance()
    • isNull

      public boolean isNull()
      Description copied from interface: CacheEntry
      Tests whether the entry represents a null value, typically used for repeatable read.
      Specified by:
      isNull in interface CacheEntry<K,V>
      Returns:
      true if this represents a null, false otherwise.
    • isChanged

      public boolean isChanged()
      Specified by:
      isChanged in interface CacheEntry<K,V>
      Returns:
      true if this entry has changed since being read from the container, false otherwise.
    • setChanged

      public void setChanged(boolean changed)
      Specified by:
      setChanged in interface CacheEntry<K,V>
    • isCreated

      public boolean isCreated()
      Specified by:
      isCreated in interface CacheEntry<K,V>
      Returns:
      true if this entry has been newly created, false otherwise.
    • setCreated

      public void setCreated(boolean created)
      Specified by:
      setCreated in interface CacheEntry<K,V>
    • isRemoved

      public boolean isRemoved()
      Specified by:
      isRemoved in interface CacheEntry<K,V>
      Returns:
      true if this entry has been removed since being read from the container, false otherwise.
    • setRemoved

      public void setRemoved(boolean removed)
      Specified by:
      setRemoved in interface CacheEntry<K,V>
    • isEvicted

      public boolean isEvicted()
      Specified by:
      isEvicted in interface CacheEntry<K,V>
      Returns:
      true if this entry has been evicted since being read from the container, false otherwise.
    • setEvicted

      public void setEvicted(boolean evicted)
      Specified by:
      setEvicted in interface CacheEntry<K,V>
    • getKey

      public K getKey()
      Description copied from interface: CacheEntry
      Retrieves the key to this entry
      Specified by:
      getKey in interface CacheEntry<K,V>
      Specified by:
      getKey in interface Map.Entry<K,V>
      Returns:
      a key
    • getValue

      public V getValue()
      Description copied from interface: CacheEntry
      Retrieves the value of this entry
      Specified by:
      getValue in interface CacheEntry<K,V>
      Specified by:
      getValue in interface Map.Entry<K,V>
      Returns:
      the value of the entry
    • getLifespan

      public long getLifespan()
      Specified by:
      getLifespan in interface CacheEntry<K,V>
      Returns:
      retrieves the lifespan of this entry. -1 means an unlimited lifespan.
    • getMaxIdle

      public long getMaxIdle()
      Specified by:
      getMaxIdle in interface CacheEntry<K,V>
      Returns:
      the maximum allowed time for which this entry can be idle, after which it is considered expired.
    • skipLookup

      public boolean skipLookup()
      Specified by:
      skipLookup in interface CacheEntry<K,V>
      Returns:
      true if the value must not be fetch from an external source
    • setValue

      public V setValue(V value)
      Description copied from interface: CacheEntry
      Sets the value of the entry, returning the previous value
      Specified by:
      setValue in interface CacheEntry<K,V>
      Specified by:
      setValue in interface Map.Entry<K,V>
      Parameters:
      value - value to set
      Returns:
      previous value
    • commit

      public void commit(DataContainer<K,V> container)
      Description copied from interface: CacheEntry
      Commits changes
      Specified by:
      commit in interface CacheEntry<K,V>
      Parameters:
      container - data container to commit to
    • setSkipLookup

      public void setSkipLookup(boolean skipLookup)
      Description copied from interface: CacheEntry
      Specified by:
      setSkipLookup in interface CacheEntry<K,V>
    • clone

      public CacheEntry<K,V> clone()
      Specified by:
      clone in interface CacheEntry<K,V>
      Overrides:
      clone in class Object
    • getMetadata

      public Metadata getMetadata()
      Description copied from interface: MetadataAware
      Get metadata of this cache entry.
      Specified by:
      getMetadata in interface MetadataAware
      Returns:
      a Metadata instance
    • setMetadata

      public void setMetadata(Metadata metadata)
      Description copied from interface: MetadataAware
      Set the metadata in the cache entry.
      Specified by:
      setMetadata in interface MetadataAware
      Parameters:
      metadata - to apply to the cache entry
    • toString

      public String toString()
      Overrides:
      toString in class Object