Package org.apache.openjpa.persistence
Class StoreCacheImpl
java.lang.Object
org.apache.openjpa.persistence.StoreCacheImpl
- All Implemented Interfaces:
jakarta.persistence.Cache
,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
ConstructorDescriptionStoreCacheImpl
(EntityManagerFactoryImpl emf, DataCache cache) Constructor; supply delegate. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether the cache contains data for the given oid.boolean
containsAll
(Class cls, Object... oids) Whether the cache contains data for the given oids.boolean
containsAll
(Class cls, Collection oids) Whether the cache contains data for the given oids.boolean
void
void
Remove data for the given oid from the cache.void
evictAll()
Clear the cache.void
Remove data for the given oids from the cache.void
evictAll
(Class cls, Collection oids) Remove data for the given oids from the cache.Delegate.Gets the number of read/write/hit on this receiver in total and per class basis.int
hashCode()
void
Pin the data for the given oid to the cache.void
Pin the data for the given oids to the cache.void
pinAll
(Class cls, Collection oids) Pin the data for the given oids to the cache.void
Unpin the data for the given oid from the cache.void
Unpin the data for the given oids from the cache.void
unpinAll
(Class cls, Collection oids) Unpin the data for the given oids from the cache.<T> T
-
Constructor Details
-
StoreCacheImpl
Constructor; supply delegate.
-
-
Method Details
-
getDelegate
Delegate.- Specified by:
getDelegate
in interfaceStoreCache
-
contains
Description copied from interface:StoreCache
Whether the cache contains data for the given oid.- Specified by:
contains
in interfacejakarta.persistence.Cache
- Specified by:
contains
in interfaceStoreCache
-
containsAll
Description copied from interface:StoreCache
Whether the cache contains data for the given oids.- Specified by:
containsAll
in interfaceStoreCache
-
containsAll
Description copied from interface:StoreCache
Whether the cache contains data for the given oids.- Specified by:
containsAll
in interfaceStoreCache
-
pin
Description copied from interface:StoreCache
Pin the data for the given oid to the cache.- Specified by:
pin
in interfaceStoreCache
-
pinAll
Description copied from interface:StoreCache
Pin the data for the given oids to the cache.- Specified by:
pinAll
in interfaceStoreCache
-
pinAll
Description copied from interface:StoreCache
Pin the data for the given oids to the cache.- Specified by:
pinAll
in interfaceStoreCache
-
unpin
Description copied from interface:StoreCache
Unpin the data for the given oid from the cache.- Specified by:
unpin
in interfaceStoreCache
-
unpinAll
Description copied from interface:StoreCache
Unpin the data for the given oids from the cache.- Specified by:
unpinAll
in interfaceStoreCache
-
unpinAll
Description copied from interface:StoreCache
Unpin the data for the given oids from the cache.- Specified by:
unpinAll
in interfaceStoreCache
-
evict
Description copied from interface:StoreCache
Remove data for the given oid from the cache.- Specified by:
evict
in interfacejakarta.persistence.Cache
- Specified by:
evict
in interfaceStoreCache
-
evictAll
Description copied from interface:StoreCache
Remove data for the given oids from the cache.- Specified by:
evictAll
in interfaceStoreCache
-
evictAll
Description copied from interface:StoreCache
Remove data for the given oids from the cache.- Specified by:
evictAll
in interfaceStoreCache
-
evictAll
public void evictAll()Description copied from interface:StoreCache
Clear the cache.- Specified by:
evictAll
in interfacejakarta.persistence.Cache
- Specified by:
evictAll
in interfaceStoreCache
-
unwrap
- Specified by:
unwrap
in interfacejakarta.persistence.Cache
-
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 interfaceStoreCache
-
hashCode
public int hashCode() -
equals
-
evict
- Specified by:
evict
in interfacejakarta.persistence.Cache
-