Package org.hibernate.cache.internal
Class DisabledCaching
java.lang.Object
org.hibernate.cache.internal.DisabledCaching
- All Implemented Interfaces:
Cache,Serializable,Cache,CacheImplementor,Service
A
CacheImplementor service used when the second-level cache is disabled.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this "cache", releasing all underlying resources.booleanbooleancontainsCollection(String role, Object ownerIdentifier) Determine whether the cache contains an item for the collection with the given role and given identifier.booleancontainsEntity(Class<?> entityClass, Object identifier) Determine whether the cache contains an item for the entity of the given type, and with the given identifier.booleancontainsEntity(String entityName, Object identifier) Determine whether the cache contains an item for the entity of the type with the given name, and with the given identifier.booleancontainsQuery(String regionName) Determine whether the given region name contains cached query results.voidvoidvoidEvict all cache data from every cache region to which some collection role is assigned.voidevictCollectionData(String role) Evict all cached data from the cache region to which the given collection role is assigned.voidevictCollectionData(String role, Object ownerIdentifier) Evict the cached item for the collection with the given role and given identifier, if there is any such item in the cache.voidEvict all cached query results from the default region.voidEvict all cached data from every cache region to which any entity type is assigned.voidevictEntityData(Class<?> entityClass) Evict all cached data from the cache region to which the given entity type is assigned.voidevictEntityData(Class<?> entityClass, Object identifier) Evicts the cached item for the entity of the given type, and with the given identifier, if there is any such item in the cache.voidevictEntityData(String entityName) Evict all cached data from the cache region to which the given named entity type is assigned.voidevictEntityData(String entityName, Object identifier) Evict the cached item for the entity of the type with the given name, and with the given identifier, if there is any such item in the cache.voidEvict all cached natural id mappings for every entity type.voidevictNaturalIdData(Class<?> entityClass) Evict all cached natural id mappings for the given entity type.voidevictNaturalIdData(String entityName) Evict all cached natural id mappings for the entity type with the given name.voidevictQueryRegion(String regionName) Evict all cached query results from the region with the given name.voidEvict all cached query results from every region.voidevictRegion(String regionName) Evict all cached data from the named cache region.The unqualified name of all regions.getCollectionRegionAccess(NavigableRole collectionRole) Deprecated.Access to the "default" region used to store query results when caching was requested but no region was explicitly named.getEntityRegionAccess(NavigableRole rootEntityName) Deprecated.getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName) Deprecated.getQueryResultsCache(String regionName) Get query cache byregion nameor create a new one if none exist.getQueryResultsCacheStrictly(String regionName) Get the named QueryResultRegionAccess but not creating one if it does not already exist.Get a cache Region by name.The underlying RegionFactory in use.TheSessionFactoryto which thisCachebelongs.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> TMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.Cache
evictAll, evictAllRegionsMethods inherited from interface org.hibernate.cache.spi.CacheImplementor
evictQueries
-
Constructor Details
-
DisabledCaching
-
-
Method Details
-
getSessionFactory
Description copied from interface:CacheTheSessionFactoryto which thisCachebelongs.- Specified by:
getSessionFactoryin interfaceCache- Specified by:
getSessionFactoryin interfaceCacheImplementor- Returns:
- The SessionFactory
-
getRegionFactory
Description copied from interface:CacheImplementorThe underlying RegionFactory in use.- Specified by:
getRegionFactoryin interfaceCacheImplementor
-
prime
Description copied from interface:CacheImplementorAn initialization phase allowing the caching provider to prime itself from the passed configs- Specified by:
primein interfaceCacheImplementor
-
containsEntity
Description copied from interface:CacheDetermine whether the cache contains an item for the entity of the given type, and with the given identifier.- Specified by:
containsEntityin interfaceCache- Parameters:
entityClass- The entity typeidentifier- The entity identifier- Returns:
- True if the underlying cache contains corresponding data; false otherwise.
-
containsEntity
Description copied from interface:CacheDetermine whether the cache contains an item for the entity of the type with the given name, and with the given identifier.- Specified by:
containsEntityin interfaceCache- Parameters:
entityName- The entity nameidentifier- The entity identifier- Returns:
- True if the underlying cache contains corresponding data; false otherwise.
-
evictEntityData
Description copied from interface:CacheEvicts the cached item for the entity of the given type, and with the given identifier, if there is any such item in the cache.- Specified by:
evictEntityDatain interfaceCache- Parameters:
entityClass- The entity typeidentifier- The entity identifier
-
evictEntityData
Description copied from interface:CacheEvict the cached item for the entity of the type with the given name, and with the given identifier, if there is any such item in the cache.- Specified by:
evictEntityDatain interfaceCache- Parameters:
entityName- The entity nameidentifier- The entity identifier
-
evictEntityData
Description copied from interface:CacheEvict all cached data from the cache region to which the given entity type is assigned. Thus, every cached item for the given entity type will be evicted, along with any cached items for any other entity type assigned to the same cache region.- Specified by:
evictEntityDatain interfaceCache- Parameters:
entityClass- The entity type
-
evictEntityData
Description copied from interface:CacheEvict all cached data from the cache region to which the given named entity type is assigned. Thus, every cached item for the given entity type will be evicted, along with any cached items for any other entity type assigned to the same cache region.- Specified by:
evictEntityDatain interfaceCache- Parameters:
entityName- The entity name
-
evictEntityData
public void evictEntityData()Description copied from interface:CacheEvict all cached data from every cache region to which any entity type is assigned.- Specified by:
evictEntityDatain interfaceCache
-
evictNaturalIdData
Description copied from interface:CacheEvict all cached natural id mappings for the given entity type.- Specified by:
evictNaturalIdDatain interfaceCache- Parameters:
entityClass- The entity type
-
evictNaturalIdData
Description copied from interface:CacheEvict all cached natural id mappings for the entity type with the given name.- Specified by:
evictNaturalIdDatain interfaceCache- Parameters:
entityName- The entity name
-
evictNaturalIdData
public void evictNaturalIdData()Description copied from interface:CacheEvict all cached natural id mappings for every entity type.- Specified by:
evictNaturalIdDatain interfaceCache
-
containsCollection
Description copied from interface:CacheDetermine whether the cache contains an item for the collection with the given role and given identifier.- Specified by:
containsCollectionin interfaceCache- Parameters:
role- The name of the collection role in the formpackage.OwnerEntityName.collectionPropertyNameownerIdentifier- The identifier of the owning entity- Returns:
- True if the underlying cache contains corresponding data; false otherwise.
-
evictCollectionData
Description copied from interface:CacheEvict the cached item for the collection with the given role and given identifier, if there is any such item in the cache.- Specified by:
evictCollectionDatain interfaceCache- Parameters:
role- The name of the collection role in the formpackage.OwnerEntityName.collectionPropertyNameownerIdentifier- The identifier of the owning entity
-
evictCollectionData
Description copied from interface:CacheEvict all cached data from the cache region to which the given collection role is assigned.- Specified by:
evictCollectionDatain interfaceCache- Parameters:
role- The name of the collection role in the formpackage.OwnerEntityName.collectionPropertyName
-
evictCollectionData
public void evictCollectionData()Description copied from interface:CacheEvict all cache data from every cache region to which some collection role is assigned.- Specified by:
evictCollectionDatain interfaceCache
-
containsQuery
Description copied from interface:CacheDetermine whether the given region name contains cached query results.- Specified by:
containsQueryin interfaceCache- Parameters:
regionName- The name of a cache region to which some query is assigned- Returns:
- True if the underlying cache contains corresponding data; false otherwise.
-
evictDefaultQueryRegion
public void evictDefaultQueryRegion()Description copied from interface:CacheEvict all cached query results from the default region.- Specified by:
evictDefaultQueryRegionin interfaceCache
-
evictQueryRegion
Description copied from interface:CacheEvict all cached query results from the region with the given name.- Specified by:
evictQueryRegionin interfaceCache- Parameters:
regionName- The cache name associated to the queries being cached.
-
evictQueryRegions
public void evictQueryRegions()Description copied from interface:CacheEvict all cached query results from every region.- Specified by:
evictQueryRegionsin interfaceCache
-
evictRegion
Description copied from interface:CacheEvict all cached data from the named cache region.- Specified by:
evictRegionin interfaceCache
-
getRegion
Description copied from interface:CacheImplementorGet a cache Region by name. If there is both aDomainDataRegionand aQueryResultsRegionwith the specified name, then theDomainDataRegionwill be returned.- Specified by:
getRegionin interfaceCacheImplementor
-
getTimestampsCache
Description copied from interface:CacheImplementorFind the cache data access strategy for Hibernate's timestamps cache. Will returnnullif Hibernate is not configured for query result caching- Specified by:
getTimestampsCachein interfaceCacheImplementor
-
getDefaultQueryResultsCache
Description copied from interface: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- Specified by:
getDefaultQueryResultsCachein interfaceCacheImplementor
-
getQueryResultsCache
Description copied from interface:CacheImplementorGet query cache byregion nameor 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- Specified by:
getQueryResultsCachein interfaceCacheImplementor
-
getQueryResultsCacheStrictly
Description copied from interface: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- Specified by:
getQueryResultsCacheStrictlyin interfaceCacheImplementor
-
close
public void close()Description copied from interface:CacheImplementorClose this "cache", releasing all underlying resources.- Specified by:
closein interfaceCacheImplementor
-
getCacheRegionNames
Description copied from interface:CacheImplementorThe unqualified name of all regions. Intended for use withCacheImplementor.getRegion(java.lang.String)- Specified by:
getCacheRegionNamesin interfaceCacheImplementor
-
contains
-
evict
-
evict
-
unwrap
-