Class StoreCacheImpl

java.lang.Object
org.apache.openjpa.persistence.StoreCacheImpl
All Implemented Interfaces:
jakarta.persistence.Cache, StoreCache

public class StoreCacheImpl extends Object implements StoreCache
Implements the L2 cache over the data store via delegation to DataCache.
Since:
0.4.1
Author:
Abe White
  • Constructor Details

  • Method Details

    • getDelegate

      public DataCache getDelegate()
      Delegate.
      Specified by:
      getDelegate in interface StoreCache
    • contains

      public boolean contains(Class cls, Object oid)
      Description copied from interface: StoreCache
      Whether the cache contains data for the given oid.
      Specified by:
      contains in interface jakarta.persistence.Cache
      Specified by:
      contains in interface StoreCache
    • containsAll

      public boolean containsAll(Class cls, Object... oids)
      Description copied from interface: StoreCache
      Whether the cache contains data for the given oids.
      Specified by:
      containsAll in interface StoreCache
    • containsAll

      public boolean containsAll(Class cls, Collection oids)
      Description copied from interface: StoreCache
      Whether the cache contains data for the given oids.
      Specified by:
      containsAll in interface StoreCache
    • pin

      public void pin(Class cls, Object oid)
      Description copied from interface: StoreCache
      Pin the data for the given oid to the cache.
      Specified by:
      pin in interface StoreCache
    • pinAll

      public void pinAll(Class cls, Object... oids)
      Description copied from interface: StoreCache
      Pin the data for the given oids to the cache.
      Specified by:
      pinAll in interface StoreCache
    • pinAll

      public void pinAll(Class cls, Collection oids)
      Description copied from interface: StoreCache
      Pin the data for the given oids to the cache.
      Specified by:
      pinAll in interface StoreCache
    • unpin

      public void unpin(Class cls, Object oid)
      Description copied from interface: StoreCache
      Unpin the data for the given oid from the cache.
      Specified by:
      unpin in interface StoreCache
    • unpinAll

      public void unpinAll(Class cls, Object... oids)
      Description copied from interface: StoreCache
      Unpin the data for the given oids from the cache.
      Specified by:
      unpinAll in interface StoreCache
    • unpinAll

      public void unpinAll(Class cls, Collection oids)
      Description copied from interface: StoreCache
      Unpin the data for the given oids from the cache.
      Specified by:
      unpinAll in interface StoreCache
    • evict

      public void evict(Class cls, Object oid)
      Description copied from interface: StoreCache
      Remove data for the given oid from the cache.
      Specified by:
      evict in interface jakarta.persistence.Cache
      Specified by:
      evict in interface StoreCache
    • evictAll

      public void evictAll(Class cls, Object... oids)
      Description copied from interface: StoreCache
      Remove data for the given oids from the cache.
      Specified by:
      evictAll in interface StoreCache
    • evictAll

      public void evictAll(Class cls, Collection oids)
      Description copied from interface: StoreCache
      Remove data for the given oids from the cache.
      Specified by:
      evictAll in interface StoreCache
    • evictAll

      public void evictAll()
      Description copied from interface: StoreCache
      Clear the cache.
      Specified by:
      evictAll in interface jakarta.persistence.Cache
      Specified by:
      evictAll in interface StoreCache
    • unwrap

      public <T> T unwrap(Class<T> cls)
      Specified by:
      unwrap in interface jakarta.persistence.Cache
    • getStatistics

      public CacheStatistics getStatistics()
      Description copied from interface: StoreCache
      Gets the number of read/write/hit on this receiver in total and per class basis.
      Specified by:
      getStatistics in interface StoreCache
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • evict

      public void evict(Class cls)
      Specified by:
      evict in interface jakarta.persistence.Cache