public interface CacheImplementor extends Service, Cache, CacheImplementor, Serializable
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 region name 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, evictRegion
SessionFactoryImplementor getSessionFactory()
Cache
getSessionFactory
in interface CacheImplementor
RegionFactory getRegionFactory()
getRegionFactory
in interface CacheImplementor
void prime(Set<DomainDataRegionConfig> cacheRegionConfigs)
prime
in interface CacheImplementor
Region getRegion(String regionName)
getRegion
in interface CacheImplementor
Set<String> getCacheRegionNames()
getRegion(java.lang.String)
getCacheRegionNames
in interface CacheImplementor
TimestampsCache getTimestampsCache()
null
if Hibernate is not configured for query result cachinggetTimestampsCache
in interface CacheImplementor
QueryResultsCache getDefaultQueryResultsCache()
null
if Hibernate is not configured for query result cachinggetDefaultQueryResultsCache
in interface CacheImplementor
QueryResultsCache getQueryResultsCache(String regionName)
null
if Hibernate is not configured for query result cachinggetQueryResultsCache
in interface CacheImplementor
QueryResultsCache getQueryResultsCacheStrictly(String regionName)
null
if Hibernate is not configured for query result
caching or if no such region (yet) existsgetQueryResultsCacheStrictly
in interface CacheImplementor
default void evictQueries() throws HibernateException
evictQueries
in interface CacheImplementor
HibernateException
void close()
close
in interface CacheImplementor
@Deprecated String[] getSecondLevelCacheRegionNames()
getCacheRegionNames()
insteadgetSecondLevelCacheRegionNames
in interface CacheImplementor
@Deprecated EntityDataAccess getEntityRegionAccess(NavigableRole rootEntityName)
EntityPersister.getCacheAccessStrategy()
insteadnull
when the entity is not configured for caching.getEntityRegionAccess
in interface CacheImplementor
rootEntityName
- The NavigableRole representation of the root entity@Deprecated NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)
EntityPersister.getNaturalIdCacheAccessStrategy()
()} insteadnull
when the entity does not define a natural-id, or its
natural-id is not configured for caching.getNaturalIdCacheRegionAccessStrategy
in interface CacheImplementor
rootEntityName
- The NavigableRole representation of the root entity@Deprecated CollectionDataAccess getCollectionRegionAccess(NavigableRole collectionRole)
EntityPersister.getNaturalIdCacheAccessStrategy()
()} insteadnull
when the collection is not configured for caching.getCollectionRegionAccess
in interface CacheImplementor
@Deprecated default UpdateTimestampsCache getUpdateTimestampsCache()
getTimestampsCache()
insteadUpdateTimestampsCache
instance managed by the SessionFactory
.getUpdateTimestampsCache
in interface CacheImplementor
@Deprecated default QueryCache getQueryCache()
getDefaultQueryResultsCache()
instead.QueryCache
.getQueryCache
in interface CacheImplementor
@Deprecated default QueryCache getDefaultQueryCache()
getDefaultQueryResultsCache()
instead.QueryCache
.getDefaultQueryCache
in interface CacheImplementor
@Deprecated default QueryCache getQueryCache(String regionName) throws HibernateException
getQueryResultsCache(String)
instead, but using unqualified namegetQueryCache
in interface CacheImplementor
HibernateException
@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 CacheImplementor
Copyright © 2019 JBoss by Red Hat. All rights reserved.