public interface CacheImplementor extends Service, Cache, CacheImplementor, Serializable
SPI contract for Hibernate’s second-level cache engine
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this "cache", releasing all underlying resources.
|
default void |
evictQueries()
Clean up the default query cache
|
Set<String> |
getCacheRegionNames()
The unqualified name of all regions.
|
CollectionDataAccess |
getCollectionRegionAccess(NavigableRole collectionRole)
Deprecated.
Use
EntityPersister.getNaturalIdCacheAccessStrategy() ()} instead |
default QueryCache |
getDefaultQueryCache()
Deprecated.
Use
getDefaultQueryResultsCache() instead. |
QueryResultsCache |
getDefaultQueryResultsCache()
Access to the "default" region used to store query results when caching
was requested but no region was explicitly named.
|
EntityDataAccess |
getEntityRegionAccess(NavigableRole rootEntityName)
Deprecated.
Use
EntityPersister.getCacheAccessStrategy() instead |
Set<NaturalIdDataAccess> |
getNaturalIdAccessesInRegion(String legacyQualifiedRegionName)
Deprecated.
No replacement - added just for support of the newly deprecated methods expecting a qualified region name
|
NaturalIdDataAccess |
getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)
Deprecated.
Use
EntityPersister.getNaturalIdCacheAccessStrategy() ()} instead |
default QueryCache |
getQueryCache()
Deprecated.
Use
getDefaultQueryResultsCache() instead. |
default QueryCache |
getQueryCache(String regionName)
Deprecated.
Use
getQueryResultsCache(String) instead, but using unqualified name |
QueryResultsCache |
getQueryResultsCache(String regionName)
Get query cache by <tt>region name</tt> or create a new one if none exist.
|
QueryResultsCache |
getQueryResultsCacheStrictly(String regionName)
Get the named QueryResultRegionAccess but not creating one if it
does not already exist.
|
Region |
getRegion(String regionName)
Get a cache Region by name
|
default Region |
getRegionByLegacyName(String legacyName)
Deprecated.
No replacement - added just for support of the newly deprecated methods expecting a qualified region name
|
RegionFactory |
getRegionFactory()
The underlying RegionFactory in use.
|
String[] |
getSecondLevelCacheRegionNames()
Deprecated.
(since 5.3) Use
getCacheRegionNames() instead |
SessionFactoryImplementor |
getSessionFactory()
Access to the SessionFactory this Cache is bound to.
|
TimestampsCache |
getTimestampsCache()
Find the cache data access strategy for Hibernate’s timestamps cache.
|
default UpdateTimestampsCache |
getUpdateTimestampsCache()
Deprecated.
Use
getTimestampsCache() instead |
void |
prime(Set<DomainDataRegionConfig> cacheRegionConfigs)
An initialization phase allowing the caching provider to prime itself
from the passed configs
|
default String |
unqualifyRegionName(String name)
Deprecated.
(since 5.3) No replacement - added just to continue some backwards compatibility
in supporting the newly deprecated methods expecting a qualified (prefix +) region name
|
containsCollection, containsEntity, containsEntity, containsQuery, evictAll, evictAllRegions, evictCollection, evictCollectionData, evictCollectionData, evictCollectionData, evictCollectionRegion, evictCollectionRegions, evictDefaultQueryRegion, evictEntity, evictEntity, evictEntityData, evictEntityData, evictEntityData, evictEntityData, evictEntityData, evictEntityRegion, evictEntityRegion, evictEntityRegions, evictNaturalIdData, evictNaturalIdData, evictNaturalIdData, evictNaturalIdRegion, evictNaturalIdRegion, evictNaturalIdRegions, evictQueryRegion, evictQueryRegions, evictRegionSessionFactoryImplementor getSessionFactory()
CacheAccess to the SessionFactory this Cache is bound to.
getSessionFactory in interface CacheImplementorRegionFactory getRegionFactory()
The underlying RegionFactory in use.
getRegionFactory in interface CacheImplementorvoid prime(Set<DomainDataRegionConfig> cacheRegionConfigs)
An initialization phase allowing the caching provider to prime itself from the passed configs
prime in interface CacheImplementorRegion getRegion(String regionName)
Get a cache Region by name
getRegion in interface CacheImplementorSet<String> getCacheRegionNames()
The unqualified name of all regions. Intended for use with getRegion(java.lang.String)
getCacheRegionNames in interface CacheImplementorTimestampsCache getTimestampsCache()
Find the cache data access strategy for Hibernate’s timestamps cache.
Will return null if Hibernate is not configured for query result caching
getTimestampsCache in interface CacheImplementorQueryResultsCache getDefaultQueryResultsCache()
Access to the "default" region used to store query results when caching
was requested but no region was explicitly named. Will return null
if Hibernate is not configured for query result caching
getDefaultQueryResultsCache in interface CacheImplementorQueryResultsCache getQueryResultsCache(String regionName)
Get query cache by <tt>region name</tt> or create a new one if none exist.
If the region name is null, then default query cache region will be returned.
Will return null if Hibernate is not configured for query result caching
getQueryResultsCache in interface CacheImplementorQueryResultsCache getQueryResultsCacheStrictly(String regionName)
Get the named QueryResultRegionAccess but not creating one if it does not already exist. This is intended for use by statistics.
Will return null if Hibernate is not configured for query result
caching or if no such region (yet) exists
getQueryResultsCacheStrictly in interface CacheImplementordefault void evictQueries()
throws HibernateException
Clean up the default query cache
evictQueries in interface CacheImplementorHibernateExceptionvoid close()
Close this "cache", releasing all underlying resources.
close in interface CacheImplementor@Deprecated String[] getSecondLevelCacheRegionNames()
getCacheRegionNames() insteadGet the qualified names of all regions caching entity and collection data.
getSecondLevelCacheRegionNames in interface CacheImplementor@Deprecated EntityDataAccess getEntityRegionAccess(NavigableRole rootEntityName)
EntityPersister.getCacheAccessStrategy() insteadFind the cache data access strategy for an entity. Will
return null when the entity is not configured for caching.
getEntityRegionAccess in interface CacheImplementorrootEntityName - The NavigableRole representation of the root entity@Deprecated NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)
EntityPersister.getNaturalIdCacheAccessStrategy() ()} insteadFind the cache data access strategy for the given entity’s natural-id cache.
Will return null when the entity does not define a natural-id, or its
natural-id is not configured for caching.
getNaturalIdCacheRegionAccessStrategy in interface CacheImplementorrootEntityName - The NavigableRole representation of the root entity@Deprecated CollectionDataAccess getCollectionRegionAccess(NavigableRole collectionRole)
EntityPersister.getNaturalIdCacheAccessStrategy() ()} insteadFind the cache data access strategy for the given collection. Will
return null when the collection is not configured for caching.
getCollectionRegionAccess in interface CacheImplementor@Deprecated default UpdateTimestampsCache getUpdateTimestampsCache()
getTimestampsCache() insteadGet UpdateTimestampsCache instance managed by the SessionFactory.
getUpdateTimestampsCache in interface CacheImplementor@Deprecated default QueryCache getQueryCache()
getDefaultQueryResultsCache() instead.Get the default QueryCache.
getQueryCache in interface CacheImplementor@Deprecated default QueryCache getDefaultQueryCache()
getDefaultQueryResultsCache() instead.Get the default QueryCache.
getDefaultQueryCache in interface CacheImplementor@Deprecated default QueryCache getQueryCache(String regionName) throws HibernateException
getQueryResultsCache(String) instead, but using unqualified namegetQueryCache in interface CacheImplementorHibernateException@Deprecated default String unqualifyRegionName(String name)
unqualifyRegionName in interface CacheImplementor@Deprecated default Region getRegionByLegacyName(String legacyName)
getRegionByLegacyName in interface CacheImplementor@Deprecated Set<NaturalIdDataAccess> getNaturalIdAccessesInRegion(String legacyQualifiedRegionName)
getNaturalIdAccessesInRegion in interface CacheImplementorCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.