Package org.apache.openjpa.persistence
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
 
 
- 
- 
Field Summary
- 
Fields inherited from interface org.apache.openjpa.persistence.StoreCache
NAME_DEFAULT 
 - 
 
- 
Constructor Summary
Constructors Constructor Description StoreCacheImpl(EntityManagerFactoryImpl emf, DataCache cache)Constructor; supply delegate. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Class cls, Object oid)Whether the cache contains data for the given oid.booleancontainsAll(Class cls, Object... oids)Whether the cache contains data for the given oids.booleancontainsAll(Class cls, Collection oids)Whether the cache contains data for the given oids.booleanequals(Object other)voidevict(Class cls)voidevict(Class cls, Object oid)Remove data for the given oid from the cache.voidevictAll()Clear the cache.voidevictAll(Class cls, Object... oids)Remove data for the given oids from the cache.voidevictAll(Class cls, Collection oids)Remove data for the given oids from the cache.DataCachegetDelegate()Delegate.CacheStatisticsgetStatistics()Gets the number of read/write/hit on this receiver in total and per class basis.inthashCode()voidpin(Class cls, Object oid)Pin the data for the given oid to the cache.voidpinAll(Class cls, Object... oids)Pin the data for the given oids to the cache.voidpinAll(Class cls, Collection oids)Pin the data for the given oids to the cache.voidunpin(Class cls, Object oid)Unpin the data for the given oid from the cache.voidunpinAll(Class cls, Object... oids)Unpin the data for the given oids from the cache.voidunpinAll(Class cls, Collection oids)Unpin the data for the given oids from the cache.<T> Tunwrap(Class<T> cls) 
 - 
 
- 
- 
Constructor Detail
- 
StoreCacheImpl
public StoreCacheImpl(EntityManagerFactoryImpl emf, DataCache cache)
Constructor; supply delegate. 
 - 
 
- 
Method Detail
- 
getDelegate
public DataCache getDelegate()
Delegate.- Specified by:
 getDelegatein interfaceStoreCache
 
- 
contains
public boolean contains(Class cls, Object oid)
Description copied from interface:StoreCacheWhether the cache contains data for the given oid.- Specified by:
 containsin interfacejakarta.persistence.Cache- Specified by:
 containsin interfaceStoreCache
 
- 
containsAll
public boolean containsAll(Class cls, Object... oids)
Description copied from interface:StoreCacheWhether the cache contains data for the given oids.- Specified by:
 containsAllin interfaceStoreCache
 
- 
containsAll
public boolean containsAll(Class cls, Collection oids)
Description copied from interface:StoreCacheWhether the cache contains data for the given oids.- Specified by:
 containsAllin interfaceStoreCache
 
- 
pin
public void pin(Class cls, Object oid)
Description copied from interface:StoreCachePin the data for the given oid to the cache.- Specified by:
 pinin interfaceStoreCache
 
- 
pinAll
public void pinAll(Class cls, Object... oids)
Description copied from interface:StoreCachePin the data for the given oids to the cache.- Specified by:
 pinAllin interfaceStoreCache
 
- 
pinAll
public void pinAll(Class cls, Collection oids)
Description copied from interface:StoreCachePin the data for the given oids to the cache.- Specified by:
 pinAllin interfaceStoreCache
 
- 
unpin
public void unpin(Class cls, Object oid)
Description copied from interface:StoreCacheUnpin the data for the given oid from the cache.- Specified by:
 unpinin interfaceStoreCache
 
- 
unpinAll
public void unpinAll(Class cls, Object... oids)
Description copied from interface:StoreCacheUnpin the data for the given oids from the cache.- Specified by:
 unpinAllin interfaceStoreCache
 
- 
unpinAll
public void unpinAll(Class cls, Collection oids)
Description copied from interface:StoreCacheUnpin the data for the given oids from the cache.- Specified by:
 unpinAllin interfaceStoreCache
 
- 
evict
public void evict(Class cls, Object oid)
Description copied from interface:StoreCacheRemove data for the given oid from the cache.- Specified by:
 evictin interfacejakarta.persistence.Cache- Specified by:
 evictin interfaceStoreCache
 
- 
evictAll
public void evictAll(Class cls, Object... oids)
Description copied from interface:StoreCacheRemove data for the given oids from the cache.- Specified by:
 evictAllin interfaceStoreCache
 
- 
evictAll
public void evictAll(Class cls, Collection oids)
Description copied from interface:StoreCacheRemove data for the given oids from the cache.- Specified by:
 evictAllin interfaceStoreCache
 
- 
evictAll
public void evictAll()
Description copied from interface:StoreCacheClear the cache.- Specified by:
 evictAllin interfacejakarta.persistence.Cache- Specified by:
 evictAllin interfaceStoreCache
 
- 
unwrap
public <T> T unwrap(Class<T> cls)
- Specified by:
 unwrapin interfacejakarta.persistence.Cache
 
- 
getStatistics
public CacheStatistics getStatistics()
Description copied from interface:StoreCacheGets the number of read/write/hit on this receiver in total and per class basis.- Specified by:
 getStatisticsin interfaceStoreCache
 
- 
evict
public void evict(Class cls)
- Specified by:
 evictin interfacejakarta.persistence.Cache
 
 - 
 
 -