Package org.apache.openjpa.persistence
Interface StoreCache
-
- All Superinterfaces:
jakarta.persistence.Cache
- All Known Implementing Classes:
StoreCacheImpl
public interface StoreCache extends jakarta.persistence.Cache
Represents the L2 cache over the data store.- Since:
- 0.4.1
- Author:
- Abe White
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME_DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated 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.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()
Deprecated.cast toStoreCacheImpl
instead.CacheStatistics
getStatistics()
Gets the number of read/write/hit on this receiver in total and per class basis.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.
-
-
-
Field Detail
-
NAME_DEFAULT
static final java.lang.String NAME_DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
contains
boolean contains(java.lang.Class cls, java.lang.Object oid)
Whether the cache contains data for the given oid.- Specified by:
contains
in interfacejakarta.persistence.Cache
-
containsAll
boolean containsAll(java.lang.Class cls, java.lang.Object... oids)
Whether the cache contains data for the given oids.
-
containsAll
boolean containsAll(java.lang.Class cls, java.util.Collection oids)
Whether the cache contains data for the given oids.
-
pin
void pin(java.lang.Class cls, java.lang.Object oid)
Pin the data for the given oid to the cache.
-
pinAll
void pinAll(java.lang.Class cls, java.lang.Object... oids)
Pin the data for the given oids to the cache.
-
pinAll
void pinAll(java.lang.Class cls, java.util.Collection oids)
Pin the data for the given oids to the cache.
-
unpin
void unpin(java.lang.Class cls, java.lang.Object oid)
Unpin the data for the given oid from the cache.
-
unpinAll
void unpinAll(java.lang.Class cls, java.lang.Object... oids)
Unpin the data for the given oids from the cache.
-
unpinAll
void unpinAll(java.lang.Class cls, java.util.Collection oids)
Unpin the data for the given oids from the cache.
-
evict
void evict(java.lang.Class cls, java.lang.Object oid)
Remove data for the given oid from the cache.- Specified by:
evict
in interfacejakarta.persistence.Cache
-
evictAll
void evictAll(java.lang.Class cls, java.lang.Object... oids)
Remove data for the given oids from the cache.
-
evictAll
void evictAll(java.lang.Class cls, java.util.Collection oids)
Remove data for the given oids from the cache.
-
evictAll
void evictAll()
Clear the cache.- Specified by:
evictAll
in interfacejakarta.persistence.Cache
-
getStatistics
CacheStatistics getStatistics()
Gets the number of read/write/hit on this receiver in total and per class basis.- Since:
- 1.3.0
-
getDelegate
@Deprecated DataCache getDelegate()
Deprecated.cast toStoreCacheImpl
instead. This method pierces the published-API boundary, as does the SPI cast.
-
-