接口 CacheImplementor
-
- 所有超级接口:
javax.persistence.Cache,Cache,CacheImplementor,Serializable,Service
- 所有已知实现类:
DisabledCaching,EnabledCaching
public interface CacheImplementor extends Service, Cache, CacheImplementor, Serializable
SPI contract for Hibernate's second-level cache engine- 从以下版本开始:
- 4.1
- 作者:
- Strong Liu, Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 voidclose()Close this "cache", releasing all underlying resources.default voidevictQueries()Clean up the default query cacheSet<String>getCacheRegionNames()The unqualified name of all regions.CollectionDataAccessgetCollectionRegionAccess(NavigableRole collectionRole)已过时。UseEntityPersister.getNaturalIdCacheAccessStrategy()()} insteaddefault QueryCachegetDefaultQueryCache()已过时。UsegetDefaultQueryResultsCache()instead.QueryResultsCachegetDefaultQueryResultsCache()Access to the "default" region used to store query results when caching was requested but no region was explicitly named.EntityDataAccessgetEntityRegionAccess(NavigableRole rootEntityName)已过时。UseEntityPersister.getCacheAccessStrategy()insteadSet<NaturalIdDataAccess>getNaturalIdAccessesInRegion(String legacyQualifiedRegionName)已过时。No replacement - added just for support of the newly deprecated methods expecting a qualified region nameNaturalIdDataAccessgetNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)已过时。UseEntityPersister.getNaturalIdCacheAccessStrategy()()} insteaddefault QueryCachegetQueryCache()已过时。UsegetDefaultQueryResultsCache()instead.default QueryCachegetQueryCache(String regionName)已过时。UsegetQueryResultsCache(String)instead, but using unqualified nameQueryResultsCachegetQueryResultsCache(String regionName)Get query cache by region name or create a new one if none exist.QueryResultsCachegetQueryResultsCacheStrictly(String regionName)Get the named QueryResultRegionAccess but not creating one if it does not already exist.RegiongetRegion(String regionName)Get a cache Region by name.default RegiongetRegionByLegacyName(String legacyName)已过时。No replacement - added just for support of the newly deprecated methods expecting a qualified region nameRegionFactorygetRegionFactory()The underlying RegionFactory in use.String[]getSecondLevelCacheRegionNames()已过时。(since 5.3) UsegetCacheRegionNames()insteadSessionFactoryImplementorgetSessionFactory()Access to the SessionFactory this Cache is bound to.TimestampsCachegetTimestampsCache()Find the cache data access strategy for Hibernate's timestamps cache.default UpdateTimestampsCachegetUpdateTimestampsCache()已过时。UsegetTimestampsCache()insteadvoidprime(Set<DomainDataRegionConfig> cacheRegionConfigs)An initialization phase allowing the caching provider to prime itself from the passed configsdefault StringunqualifyRegionName(String name)已过时。(since 5.3) No replacement - added just to continue some backwards compatibility in supporting the newly deprecated methods expecting a qualified (prefix +) region name-
从接口继承的方法 org.hibernate.Cache
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
-
-
-
-
方法详细资料
-
getSessionFactory
SessionFactoryImplementor getSessionFactory()
从接口复制的说明:CacheAccess to the SessionFactory this Cache is bound to.- 指定者:
getSessionFactory在接口中Cache- 指定者:
getSessionFactory在接口中CacheImplementor- 返回:
- The SessionFactory
-
getRegionFactory
RegionFactory getRegionFactory()
The underlying RegionFactory in use.- 指定者:
getRegionFactory在接口中CacheImplementor
-
prime
void prime(Set<DomainDataRegionConfig> cacheRegionConfigs)
An initialization phase allowing the caching provider to prime itself from the passed configs- 指定者:
prime在接口中CacheImplementor- 从以下版本开始:
- 5.3
-
getRegion
Region getRegion(String regionName)
Get a cache Region by name. If there is both aDomainDataRegionand aQueryResultsRegionwith the specified name, then theDomainDataRegionwill be returned.- 指定者:
getRegion在接口中CacheImplementor- 从以下版本开始:
- 5.3
-
getCacheRegionNames
Set<String> getCacheRegionNames()
The unqualified name of all regions. Intended for use withgetRegion(java.lang.String)- 指定者:
getCacheRegionNames在接口中CacheImplementor- 从以下版本开始:
- 5.3
-
getTimestampsCache
TimestampsCache getTimestampsCache()
Find the cache data access strategy for Hibernate's timestamps cache. Will returnnullif Hibernate is not configured for query result caching- 指定者:
getTimestampsCache在接口中CacheImplementor- 从以下版本开始:
- 5.3
-
getDefaultQueryResultsCache
QueryResultsCache getDefaultQueryResultsCache()
Access to the "default" region used to store query results when caching was requested but no region was explicitly named. Will returnnullif Hibernate is not configured for query result caching- 指定者:
getDefaultQueryResultsCache在接口中CacheImplementor
-
getQueryResultsCache
QueryResultsCache getQueryResultsCache(String regionName)
Get query cache by region name or create a new one if none exist. If the region name is null, then default query cache region will be returned. Will returnnullif Hibernate is not configured for query result caching- 指定者:
getQueryResultsCache在接口中CacheImplementor
-
getQueryResultsCacheStrictly
QueryResultsCache 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 returnnullif Hibernate is not configured for query result caching or if no such region (yet) exists- 指定者:
getQueryResultsCacheStrictly在接口中CacheImplementor- 从以下版本开始:
- 5.3
-
evictQueries
default void evictQueries() throws HibernateExceptionClean up the default query cache- 指定者:
evictQueries在接口中CacheImplementor- 抛出:
HibernateException
-
close
void close()
Close this "cache", releasing all underlying resources.- 指定者:
close在接口中CacheImplementor
-
getSecondLevelCacheRegionNames
@Deprecated String[] getSecondLevelCacheRegionNames()
已过时。(since 5.3) UsegetCacheRegionNames()insteadGet the *qualified* names of all regions caching entity and collection data.- 指定者:
getSecondLevelCacheRegionNames在接口中CacheImplementor- 返回:
- All cache region names
-
getEntityRegionAccess
@Deprecated EntityDataAccess getEntityRegionAccess(NavigableRole rootEntityName)
已过时。UseEntityPersister.getCacheAccessStrategy()insteadFind the cache data access strategy for an entity. Will returnnullwhen the entity is not configured for caching.- 指定者:
getEntityRegionAccess在接口中CacheImplementor- 参数:
rootEntityName- The NavigableRole representation of the root entity
-
getNaturalIdCacheRegionAccessStrategy
@Deprecated NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)
已过时。UseEntityPersister.getNaturalIdCacheAccessStrategy()()} insteadFind the cache data access strategy for the given entity's natural-id cache. Will returnnullwhen the entity does not define a natural-id, or its natural-id is not configured for caching.- 指定者:
getNaturalIdCacheRegionAccessStrategy在接口中CacheImplementor- 参数:
rootEntityName- The NavigableRole representation of the root entity
-
getCollectionRegionAccess
@Deprecated CollectionDataAccess getCollectionRegionAccess(NavigableRole collectionRole)
已过时。UseEntityPersister.getNaturalIdCacheAccessStrategy()()} insteadFind the cache data access strategy for the given collection. Will returnnullwhen the collection is not configured for caching.- 指定者:
getCollectionRegionAccess在接口中CacheImplementor
-
getUpdateTimestampsCache
@Deprecated default UpdateTimestampsCache getUpdateTimestampsCache()
已过时。UsegetTimestampsCache()insteadGetUpdateTimestampsCacheinstance managed by theSessionFactory.- 指定者:
getUpdateTimestampsCache在接口中CacheImplementor
-
getQueryCache
@Deprecated default QueryCache getQueryCache()
已过时。UsegetDefaultQueryResultsCache()instead.Get the defaultQueryCache.- 指定者:
getQueryCache在接口中CacheImplementor
-
getDefaultQueryCache
@Deprecated default QueryCache getDefaultQueryCache()
已过时。UsegetDefaultQueryResultsCache()instead.Get the defaultQueryCache.- 指定者:
getDefaultQueryCache在接口中CacheImplementor
-
getQueryCache
@Deprecated default QueryCache getQueryCache(String regionName) throws HibernateException
已过时。UsegetQueryResultsCache(String)instead, but using unqualified name- 指定者:
getQueryCache在接口中CacheImplementor- 抛出:
HibernateException
-
unqualifyRegionName
@Deprecated default String unqualifyRegionName(String name)
已过时。(since 5.3) No replacement - added just to continue some backwards compatibility in supporting the newly deprecated methods expecting a qualified (prefix +) region name- 指定者:
unqualifyRegionName在接口中CacheImplementor
-
getRegionByLegacyName
@Deprecated default Region getRegionByLegacyName(String legacyName)
已过时。No replacement - added just for support of the newly deprecated methods expecting a qualified region name- 指定者:
getRegionByLegacyName在接口中CacheImplementor
-
getNaturalIdAccessesInRegion
@Deprecated Set<NaturalIdDataAccess> getNaturalIdAccessesInRegion(String legacyQualifiedRegionName)
已过时。No replacement - added just for support of the newly deprecated methods expecting a qualified region name- 指定者:
getNaturalIdAccessesInRegion在接口中CacheImplementor
-
-