Class AbstractInternalCacheEntry

java.lang.Object
org.infinispan.container.entries.AbstractInternalCacheEntry
All Implemented Interfaces:
Cloneable, Map.Entry, CacheEntry, InternalCacheEntry, MetadataAware
Direct Known Subclasses:
ImmortalCacheEntry, MetadataMortalCacheEntry, MetadataTransientCacheEntry, MetadataTransientMortalCacheEntry, MortalCacheEntry, TransientCacheEntry, TransientMortalCacheEntry

public abstract class AbstractInternalCacheEntry extends Object implements InternalCacheEntry
An abstract internal cache entry that is typically stored in the data container
Since:
4.0
Author:
Manik Surtani
  • Field Details

  • Constructor Details

  • Method Details

    • commit

      public final void commit(DataContainer container)
      Description copied from interface: CacheEntry
      Commits changes
      Specified by:
      commit in interface CacheEntry
      Parameters:
      container - data container to commit to
    • setChanged

      public void setChanged(boolean changed)
      Specified by:
      setChanged in interface CacheEntry
    • setCreated

      public final void setCreated(boolean created)
      Specified by:
      setCreated in interface CacheEntry
    • setRemoved

      public final void setRemoved(boolean removed)
      Specified by:
      setRemoved in interface CacheEntry
    • setEvicted

      public final void setEvicted(boolean evicted)
      Specified by:
      setEvicted in interface CacheEntry
    • setSkipLookup

      public void setSkipLookup(boolean skipLookup)
      Description copied from interface: CacheEntry
      Specified by:
      setSkipLookup in interface CacheEntry
    • isNull

      public final 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
      Returns:
      true if this represents a null, false otherwise.
    • isChanged

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

      public final boolean isCreated()
      Specified by:
      isCreated in interface CacheEntry
      Returns:
      true if this entry has been newly created, false otherwise.
    • isRemoved

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

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

      public boolean skipLookup()
      Specified by:
      skipLookup in interface CacheEntry
      Returns:
      true if the value must not be fetch from an external source
    • 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
    • getKey

      public final Object getKey()
      Description copied from interface: CacheEntry
      Retrieves the key to this entry
      Specified by:
      getKey in interface CacheEntry
      Specified by:
      getKey in interface Map.Entry
      Returns:
      a key
    • getValue

      public final Object getValue()
      Description copied from interface: CacheEntry
      Retrieves the value of this entry
      Specified by:
      getValue in interface CacheEntry
      Specified by:
      getValue in interface Map.Entry
      Returns:
      the value of the entry
    • setValue

      public final Object setValue(Object value)
      Description copied from interface: CacheEntry
      Sets the value of the entry, returning the previous value
      Specified by:
      setValue in interface CacheEntry
      Specified by:
      setValue in interface Map.Entry
      Parameters:
      value - value to set
      Returns:
      previous value
    • isL1Entry

      public boolean isL1Entry()
      Specified by:
      isL1Entry in interface InternalCacheEntry
      Returns:
      true if the entry is a L1 entry.
    • getInternalMetadata

      public final PrivateMetadata getInternalMetadata()
      Specified by:
      getInternalMetadata in interface CacheEntry
    • setInternalMetadata

      public final void setInternalMetadata(PrivateMetadata metadata)
      Specified by:
      setInternalMetadata in interface CacheEntry
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • clone

      Specified by:
      clone in interface CacheEntry
      Specified by:
      clone in interface InternalCacheEntry
      Overrides:
      clone in class Object
    • equals

      public final boolean equals(Object o)
      Specified by:
      equals in interface Map.Entry
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Specified by:
      hashCode in interface Map.Entry
      Overrides:
      hashCode in class Object
    • appendFieldsToString

      protected void appendFieldsToString(StringBuilder builder)