类 DisabledCaching
- java.lang.Object
-
- org.hibernate.cache.internal.DisabledCaching
-
- 所有已实现的接口:
Serializable,javax.persistence.Cache,Cache,CacheImplementor,CacheImplementor,Service
public class DisabledCaching extends Object implements CacheImplementor
CacheImplementor implementation for disabled caching- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 DisabledCaching(SessionFactoryImplementor sessionFactory)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()Close this "cache", releasing all underlying resources.booleancontains(Class cls, Object primaryKey)booleancontainsCollection(String role, Serializable ownerIdentifier)Determine whether the cache contains data for the given collection.booleancontainsEntity(Class entityClass, Serializable identifier)Determine whether the cache contains data for the given entity "instance".booleancontainsEntity(String entityName, Serializable identifier)Determine whether the cache contains data for the given entity "instance".booleancontainsQuery(String regionName)Determine whether the cache contains data for the given query.voidevict(Class cls)voidevict(Class cls, Object primaryKey)voidevictCollectionData()Evict cache data for all collectionsvoidevictCollectionData(String role)Evicts cached data for the given collection rolevoidevictCollectionData(String role, Serializable ownerIdentifier)Evicts the cache data for the given identified collection "instance"voidevictDefaultQueryRegion()Evicts all cached query results from the default region.voidevictEntityData()Evict data from all entity regions.voidevictEntityData(Class entityClass)Evicts all entity data from the given region (i.e. for all entities of type).voidevictEntityData(Class entityClass, Serializable identifier)Evicts the entity data for a particular entity "instance".voidevictEntityData(String entityName)Evicts all entity data from the given region (i.e. for all entities of type).voidevictEntityData(String entityName, Serializable identifier)Evicts the entity data for a particular entity "instance".voidevictNaturalIdData()Evict cached data for all natural-ids (for all entities)voidevictNaturalIdData(Class entityClass)Evict cached data for the given entity's natural-idvoidevictNaturalIdData(String entityName)Evict cached data for the given entity's natural-idvoidevictQueryRegion(String regionName)Evicts all cached query results under the given name.voidevictQueryRegions()Evict data from all query regions.voidevictRegion(String regionName)Evict all data from the named cache regionSet<String>getCacheRegionNames()The unqualified name of all regions.CollectionDataAccessgetCollectionRegionAccess(NavigableRole collectionRole)Find the cache data access strategy for the given collection.QueryResultsCachegetDefaultQueryResultsCache()Access to the "default" region used to store query results when caching was requested but no region was explicitly named.EntityDataAccessgetEntityRegionAccess(NavigableRole rootEntityName)Find the cache data access strategy for an entity.Set<NaturalIdDataAccess>getNaturalIdAccessesInRegion(String regionName)NaturalIdDataAccessgetNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)Find the cache data access strategy for the given entity's natural-id cache.QueryResultsCachegetQueryResultsCache(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 fullRegionName)Get a cache Region by name.RegionFactorygetRegionFactory()The underlying RegionFactory in use.String[]getSecondLevelCacheRegionNames()Get the *qualified* names of all regions caching entity and collection data.SessionFactoryImplementorgetSessionFactory()Access to the SessionFactory this Cache is bound to.TimestampsCachegetTimestampsCache()Find the cache data access strategy for Hibernate's timestamps cache.voidprime(Set<DomainDataRegionConfig> cacheRegionConfigs)An initialization phase allowing the caching provider to prime itself from the passed configs<T> Tunwrap(Class<T> cls)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.Cache
evictAll, evictAllRegions, evictCollection, evictCollectionRegion, evictCollectionRegions, evictEntity, evictEntity, evictEntityRegion, evictEntityRegion, evictEntityRegions, evictNaturalIdRegion, evictNaturalIdRegion, evictNaturalIdRegions
-
从接口继承的方法 org.hibernate.cache.spi.CacheImplementor
evictQueries, getDefaultQueryCache, getQueryCache, getQueryCache, getRegionByLegacyName, getUpdateTimestampsCache, unqualifyRegionName
-
-
-
-
构造器详细资料
-
DisabledCaching
public DisabledCaching(SessionFactoryImplementor sessionFactory)
-
-
方法详细资料
-
getSessionFactory
public SessionFactoryImplementor getSessionFactory()
从接口复制的说明:CacheAccess to the SessionFactory this Cache is bound to.- 指定者:
getSessionFactory在接口中Cache- 指定者:
getSessionFactory在接口中CacheImplementor- 指定者:
getSessionFactory在接口中CacheImplementor- 返回:
- The SessionFactory
-
getRegionFactory
public RegionFactory getRegionFactory()
从接口复制的说明:CacheImplementorThe underlying RegionFactory in use.- 指定者:
getRegionFactory在接口中CacheImplementor- 指定者:
getRegionFactory在接口中CacheImplementor
-
prime
public void prime(Set<DomainDataRegionConfig> cacheRegionConfigs)
从接口复制的说明:CacheImplementorAn initialization phase allowing the caching provider to prime itself from the passed configs- 指定者:
prime在接口中CacheImplementor- 指定者:
prime在接口中CacheImplementor
-
containsEntity
public boolean containsEntity(Class entityClass, Serializable identifier)
从接口复制的说明:CacheDetermine whether the cache contains data for the given entity "instance". The semantic here is whether the cache contains data visible for the current call context.- 指定者:
containsEntity在接口中Cache- 参数:
entityClass- The entity class.identifier- The entity identifier- 返回:
- True if the underlying cache contains corresponding data; false otherwise.
-
containsEntity
public boolean containsEntity(String entityName, Serializable identifier)
从接口复制的说明:CacheDetermine whether the cache contains data for the given entity "instance". The semantic here is whether the cache contains data visible for the current call context.- 指定者:
containsEntity在接口中Cache- 参数:
entityName- The entity name.identifier- The entity identifier- 返回:
- True if the underlying cache contains corresponding data; false otherwise.
-
evictEntityData
public void evictEntityData(Class entityClass, Serializable identifier)
从接口复制的说明:CacheEvicts the entity data for a particular entity "instance".- 指定者:
evictEntityData在接口中Cache- 参数:
entityClass- The entity class.identifier- The entity identifier
-
evictEntityData
public void evictEntityData(String entityName, Serializable identifier)
从接口复制的说明:CacheEvicts the entity data for a particular entity "instance".- 指定者:
evictEntityData在接口中Cache- 参数:
entityName- The entity name.identifier- The entity identifier
-
evictEntityData
public void evictEntityData(Class entityClass)
从接口复制的说明:CacheEvicts all entity data from the given region (i.e. for all entities of type).- 指定者:
evictEntityData在接口中Cache- 参数:
entityClass- The entity class.
-
evictEntityData
public void evictEntityData(String entityName)
从接口复制的说明:CacheEvicts all entity data from the given region (i.e. for all entities of type).- 指定者:
evictEntityData在接口中Cache- 参数:
entityName- The entity name.
-
evictEntityData
public void evictEntityData()
从接口复制的说明:CacheEvict data from all entity regions.- 指定者:
evictEntityData在接口中Cache
-
evictNaturalIdData
public void evictNaturalIdData(Class entityClass)
从接口复制的说明:CacheEvict cached data for the given entity's natural-id- 指定者:
evictNaturalIdData在接口中Cache- 参数:
entityClass- The entity class.
-
evictNaturalIdData
public void evictNaturalIdData(String entityName)
从接口复制的说明:CacheEvict cached data for the given entity's natural-id- 指定者:
evictNaturalIdData在接口中Cache- 参数:
entityName- The entity name.
-
evictNaturalIdData
public void evictNaturalIdData()
从接口复制的说明:CacheEvict cached data for all natural-ids (for all entities)- 指定者:
evictNaturalIdData在接口中Cache
-
containsCollection
public boolean containsCollection(String role, Serializable ownerIdentifier)
从接口复制的说明:CacheDetermine whether the cache contains data for the given collection. The semantic here is whether the cache contains data visible for the current call context.- 指定者:
containsCollection在接口中Cache- 参数:
role- The name of the collection role (in form [owner-entity-name].[collection-property-name]) whose regions should be evicted.ownerIdentifier- The identifier of the owning entity- 返回:
- True if the underlying cache contains corresponding data; false otherwise.
-
evictCollectionData
public void evictCollectionData(String role, Serializable ownerIdentifier)
从接口复制的说明:CacheEvicts the cache data for the given identified collection "instance"- 指定者:
evictCollectionData在接口中Cache- 参数:
role- The "collection role" (in form [owner-entity-name].[collection-property-name]).ownerIdentifier- The identifier of the owning entity
-
evictCollectionData
public void evictCollectionData(String role)
从接口复制的说明:CacheEvicts cached data for the given collection role- 指定者:
evictCollectionData在接口中Cache- 参数:
role- The "collection role" (in form [owner-entity-name].[collection-property-name]).
-
evictCollectionData
public void evictCollectionData()
从接口复制的说明:CacheEvict cache data for all collections- 指定者:
evictCollectionData在接口中Cache
-
containsQuery
public boolean containsQuery(String regionName)
从接口复制的说明:CacheDetermine whether the cache contains data for the given query. The semantic here is whether the cache contains any data for the given region name since query result caches are not transactionally isolated.- 指定者:
containsQuery在接口中Cache- 参数:
regionName- The cache name given to the query.- 返回:
- True if the underlying cache contains corresponding data; false otherwise.
-
evictDefaultQueryRegion
public void evictDefaultQueryRegion()
从接口复制的说明:CacheEvicts all cached query results from the default region.- 指定者:
evictDefaultQueryRegion在接口中Cache
-
evictQueryRegion
public void evictQueryRegion(String regionName)
从接口复制的说明:CacheEvicts all cached query results under the given name.- 指定者:
evictQueryRegion在接口中Cache- 参数:
regionName- The cache name associated to the queries being cached.
-
evictQueryRegions
public void evictQueryRegions()
从接口复制的说明:CacheEvict data from all query regions.- 指定者:
evictQueryRegions在接口中Cache
-
evictRegion
public void evictRegion(String regionName)
从接口复制的说明:CacheEvict all data from the named cache region- 指定者:
evictRegion在接口中Cache
-
getRegion
public Region getRegion(String fullRegionName)
从接口复制的说明:CacheImplementorGet a cache Region by name. If there is both aDomainDataRegionand aQueryResultsRegionwith the specified name, then theDomainDataRegionwill be returned.- 指定者:
getRegion在接口中CacheImplementor- 指定者:
getRegion在接口中CacheImplementor
-
getTimestampsCache
public TimestampsCache getTimestampsCache()
从接口复制的说明:CacheImplementorFind the cache data access strategy for Hibernate's timestamps cache. Will returnnullif Hibernate is not configured for query result caching- 指定者:
getTimestampsCache在接口中CacheImplementor- 指定者:
getTimestampsCache在接口中CacheImplementor
-
getDefaultQueryResultsCache
public QueryResultsCache getDefaultQueryResultsCache()
从接口复制的说明:CacheImplementorAccess 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- 指定者:
getDefaultQueryResultsCache在接口中CacheImplementor
-
getQueryResultsCache
public QueryResultsCache getQueryResultsCache(String regionName)
从接口复制的说明:CacheImplementorGet 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- 指定者:
getQueryResultsCache在接口中CacheImplementor
-
getQueryResultsCacheStrictly
public QueryResultsCache getQueryResultsCacheStrictly(String regionName)
从接口复制的说明:CacheImplementorGet 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- 指定者:
getQueryResultsCacheStrictly在接口中CacheImplementor
-
close
public void close()
从接口复制的说明:CacheImplementorClose this "cache", releasing all underlying resources.- 指定者:
close在接口中CacheImplementor- 指定者:
close在接口中CacheImplementor
-
getSecondLevelCacheRegionNames
public String[] getSecondLevelCacheRegionNames()
从接口复制的说明:CacheImplementorGet the *qualified* names of all regions caching entity and collection data.- 指定者:
getSecondLevelCacheRegionNames在接口中CacheImplementor- 指定者:
getSecondLevelCacheRegionNames在接口中CacheImplementor- 返回:
- All cache region names
-
getCacheRegionNames
public Set<String> getCacheRegionNames()
从接口复制的说明:CacheImplementorThe unqualified name of all regions. Intended for use withCacheImplementor.getRegion(java.lang.String)- 指定者:
getCacheRegionNames在接口中CacheImplementor- 指定者:
getCacheRegionNames在接口中CacheImplementor
-
getEntityRegionAccess
public EntityDataAccess getEntityRegionAccess(NavigableRole rootEntityName)
从接口复制的说明:CacheImplementorFind the cache data access strategy for an entity. Will returnnullwhen the entity is not configured for caching.- 指定者:
getEntityRegionAccess在接口中CacheImplementor- 指定者:
getEntityRegionAccess在接口中CacheImplementor- 参数:
rootEntityName- The NavigableRole representation of the root entity
-
getNaturalIdCacheRegionAccessStrategy
public NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)
从接口复制的说明:CacheImplementorFind 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- 指定者:
getNaturalIdCacheRegionAccessStrategy在接口中CacheImplementor- 参数:
rootEntityName- The NavigableRole representation of the root entity
-
getCollectionRegionAccess
public CollectionDataAccess getCollectionRegionAccess(NavigableRole collectionRole)
从接口复制的说明:CacheImplementorFind the cache data access strategy for the given collection. Will returnnullwhen the collection is not configured for caching.- 指定者:
getCollectionRegionAccess在接口中CacheImplementor- 指定者:
getCollectionRegionAccess在接口中CacheImplementor
-
contains
public boolean contains(Class cls, Object primaryKey)
- 指定者:
contains在接口中javax.persistence.Cache
-
evict
public void evict(Class cls)
- 指定者:
evict在接口中javax.persistence.Cache
-
unwrap
public <T> T unwrap(Class<T> cls)
- 指定者:
unwrap在接口中javax.persistence.Cache
-
getNaturalIdAccessesInRegion
public Set<NaturalIdDataAccess> getNaturalIdAccessesInRegion(String regionName)
- 指定者:
getNaturalIdAccessesInRegion在接口中CacheImplementor- 指定者:
getNaturalIdAccessesInRegion在接口中CacheImplementor
-
-