Class JDODataStoreCache

  • All Implemented Interfaces:
    Serializable, javax.jdo.datastore.DataStoreCache

    public class JDODataStoreCache
    extends Object
    implements javax.jdo.datastore.DataStoreCache, Serializable
    Implementation of the JDO DataStoreCache. Provides a wrapper and hands off calls to the underlying Level2 cache
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.jdo.datastore.DataStoreCache

        javax.jdo.datastore.DataStoreCache.EmptyDataStoreCache
    • Constructor Summary

      Constructors 
      Constructor Description
      JDODataStoreCache​(org.datanucleus.cache.Level2Cache cache)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void evict​(Object oid)
      Evict the parameter instance from the second-level cache.
      void evictAll()
      Evict the parameter instances from the second-level cache.
      void evictAll​(boolean subclasses, Class pcClass)
      Evict the parameter instances from the second-level cache.
      void evictAll​(Object... oids)
      Evict the parameter instances from the second-level cache.
      void evictAll​(Collection oids)
      Evict the parameter instances from the second-level cache.
      org.datanucleus.cache.Level2Cache getLevel2Cache()
      Accessor for the underlying Level 2 cache.
      void pin​(Object oid)
      Pin the parameter instance in the second-level cache.
      void pinAll​(boolean subclasses, Class pcClass)
      Pin instances in the second-level cache.
      void pinAll​(Object... oids)
      Pin the parameter instances in the second-level cache.
      void pinAll​(Collection oids)
      Pin the parameter instances in the second-level cache.
      void unpin​(Object oid)
      Unpin the parameter instance from the second-level cache.
      void unpinAll​(boolean subclasses, Class pcClass)
      Unpin instances from the second-level cache.
      void unpinAll​(Object... oids)
      Unpin the parameter instance from the second-level cache.
      void unpinAll​(Collection oids)
      Unpin the parameter instances from the second-level cache.
    • Constructor Detail

      • JDODataStoreCache

        public JDODataStoreCache​(org.datanucleus.cache.Level2Cache cache)
        Constructor.
        Parameters:
        cache - Level 2 Cache
    • Method Detail

      • getLevel2Cache

        public org.datanucleus.cache.Level2Cache getLevel2Cache()
        Accessor for the underlying Level 2 cache.
        Returns:
        Underlying L2 cache.
      • evict

        public void evict​(Object oid)
        Evict the parameter instance from the second-level cache.
        Specified by:
        evict in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oid - the object id of the instance to evict.
      • evictAll

        public void evictAll()
        Evict the parameter instances from the second-level cache. All instances in the PersistenceManager's cache are evicted from the second-level cache.
        Specified by:
        evictAll in interface javax.jdo.datastore.DataStoreCache
      • evictAll

        public void evictAll​(Object... oids)
        Evict the parameter instances from the second-level cache.
        Specified by:
        evictAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oids - the object ids of the instance to evict.
      • evictAll

        public void evictAll​(Collection oids)
        Evict the parameter instances from the second-level cache.
        Specified by:
        evictAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oids - the object ids of the instance to evict.
      • evictAll

        public void evictAll​(boolean subclasses,
                             Class pcClass)
        Evict the parameter instances from the second-level cache.
        Specified by:
        evictAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        pcClass - the class of instances to evict
        subclasses - if true, evict instances of subclasses also
      • pin

        public void pin​(Object oid)
        Pin the parameter instance in the second-level cache.
        Specified by:
        pin in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oid - the object id of the instance to pin.
      • pinAll

        public void pinAll​(Collection oids)
        Pin the parameter instances in the second-level cache.
        Specified by:
        pinAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oids - the object ids of the instances to pin.
      • pinAll

        public void pinAll​(Object... oids)
        Pin the parameter instances in the second-level cache.
        Specified by:
        pinAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oids - the object ids of the instances to pin.
      • pinAll

        public void pinAll​(boolean subclasses,
                           Class pcClass)
        Pin instances in the second-level cache.
        Specified by:
        pinAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        subclasses - if true, pin instances of subclasses also
        pcClass - the class of instances to pin
      • unpin

        public void unpin​(Object oid)
        Unpin the parameter instance from the second-level cache.
        Specified by:
        unpin in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oid - the object id of the instance to unpin.
      • unpinAll

        public void unpinAll​(Collection oids)
        Unpin the parameter instances from the second-level cache.
        Specified by:
        unpinAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oids - the object ids of the instance to evict.
      • unpinAll

        public void unpinAll​(Object... oids)
        Unpin the parameter instance from the second-level cache.
        Specified by:
        unpinAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        oids - the object id of the instance to evict.
      • unpinAll

        public void unpinAll​(boolean subclasses,
                             Class pcClass)
        Unpin instances from the second-level cache.
        Specified by:
        unpinAll in interface javax.jdo.datastore.DataStoreCache
        Parameters:
        subclasses - if true, unpin instances of subclasses also
        pcClass - the class of instances to unpin