Class StoreCacheImpl

  • All Implemented Interfaces:
    jakarta.persistence.Cache, StoreCache

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.Class cls, java.lang.Object oid)
      Whether the cache contains data for the given oid.
      boolean containsAll​(java.lang.Class cls, java.lang.Object... oids)
      Whether the cache contains data for the given oids.
      boolean containsAll​(java.lang.Class cls, java.util.Collection oids)
      Whether the cache contains data for the given oids.
      boolean equals​(java.lang.Object other)  
      void evict​(java.lang.Class cls)  
      void evict​(java.lang.Class cls, java.lang.Object oid)
      Remove data for the given oid from the cache.
      void evictAll()
      Clear the cache.
      void evictAll​(java.lang.Class cls, java.lang.Object... oids)
      Remove data for the given oids from the cache.
      void evictAll​(java.lang.Class cls, java.util.Collection oids)
      Remove data for the given oids from the cache.
      DataCache getDelegate()
      Delegate.
      CacheStatistics getStatistics()
      Gets the number of read/write/hit on this receiver in total and per class basis.
      int hashCode()  
      void pin​(java.lang.Class cls, java.lang.Object oid)
      Pin the data for the given oid to the cache.
      void pinAll​(java.lang.Class cls, java.lang.Object... oids)
      Pin the data for the given oids to the cache.
      void pinAll​(java.lang.Class cls, java.util.Collection oids)
      Pin the data for the given oids to the cache.
      void unpin​(java.lang.Class cls, java.lang.Object oid)
      Unpin the data for the given oid from the cache.
      void unpinAll​(java.lang.Class cls, java.lang.Object... oids)
      Unpin the data for the given oids from the cache.
      void unpinAll​(java.lang.Class cls, java.util.Collection oids)
      Unpin the data for the given oids from the cache.
      <T> T unwrap​(java.lang.Class<T> cls)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • contains

        public boolean contains​(java.lang.Class cls,
                                java.lang.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​(java.lang.Class cls,
                                   java.lang.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​(java.lang.Class cls,
                                   java.util.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​(java.lang.Class cls,
                        java.lang.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​(java.lang.Class cls,
                           java.lang.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​(java.lang.Class cls,
                           java.util.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​(java.lang.Class cls,
                          java.lang.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​(java.lang.Class cls,
                             java.lang.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​(java.lang.Class cls,
                             java.util.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​(java.lang.Class cls,
                          java.lang.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​(java.lang.Class cls,
                             java.lang.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​(java.lang.Class cls,
                             java.util.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​(java.lang.Class<T> cls)
        Specified by:
        unwrap in interface jakarta.persistence.Cache
      • hashCode

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

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • evict

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