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 TypeMethodDescriptionvoid
close()
Close this "cache", releasing all underlying resources.boolean
boolean
containsCollection
(String role, Object ownerIdentifier) Determine whether the cache contains an item for the collection with the given role and given identifier.boolean
containsEntity
(Class<?> entityClass, Object identifier) Determine whether the cache contains an item for the entity of the given type, and with the given identifier.boolean
containsEntity
(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.boolean
containsQuery
(String regionName) Determine whether the given region name contains cached query results.void
void
void
Evict all cache data from every cache region to which some collection role is assigned.void
evictCollectionData
(String role) Evict all cached data from the cache region to which the given collection role is assigned.void
evictCollectionData
(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.void
Evict all cached query results from the default region.void
Evict all cached data from every cache region to which any entity type is assigned.void
evictEntityData
(Class<?> entityClass) Evict all cached data from the cache region to which the given entity type is assigned.void
evictEntityData
(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.void
evictEntityData
(String entityName) Evict all cached data from the cache region to which the given named entity type is assigned.void
evictEntityData
(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.void
Evict all cached natural id mappings for every entity type.void
evictNaturalIdData
(Class<?> entityClass) Evict all cached natural id mappings for the given entity type.void
evictNaturalIdData
(String entityName) Evict all cached natural id mappings for the entity type with the given name.void
evictQueryRegion
(String regionName) Evict all cached query results from the region with the given name.void
Evict all cached query results from every region.void
evictRegion
(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 name
or 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.TheSessionFactory
to which thisCache
belongs.Find the cache data access strategy for Hibernate's timestamps cache.void
prime
(Set<DomainDataRegionConfig> cacheRegionConfigs) An initialization phase allowing the caching provider to prime itself from the passed configs<T> T
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.Cache
evictAll, evictAllRegions
Methods inherited from interface org.hibernate.cache.spi.CacheImplementor
evictQueries
-
Constructor Details
-
DisabledCaching
-
-
Method Details
-
getSessionFactory
Description copied from interface:Cache
TheSessionFactory
to which thisCache
belongs.- Specified by:
getSessionFactory
in interfaceCache
- Specified by:
getSessionFactory
in interfaceCacheImplementor
- Returns:
- The SessionFactory
-
getRegionFactory
Description copied from interface:CacheImplementor
The underlying RegionFactory in use.- Specified by:
getRegionFactory
in interfaceCacheImplementor
-
prime
Description copied from interface:CacheImplementor
An initialization phase allowing the caching provider to prime itself from the passed configs- Specified by:
prime
in interfaceCacheImplementor
-
containsEntity
Description copied from interface:Cache
Determine whether the cache contains an item for the entity of the given type, and with the given identifier.- Specified by:
containsEntity
in 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:Cache
Determine whether the cache contains an item for the entity of the type with the given name, and with the given identifier.- Specified by:
containsEntity
in 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:Cache
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.- Specified by:
evictEntityData
in interfaceCache
- Parameters:
entityClass
- The entity typeidentifier
- The entity identifier
-
evictEntityData
Description copied from interface:Cache
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.- Specified by:
evictEntityData
in interfaceCache
- Parameters:
entityName
- The entity nameidentifier
- The entity identifier
-
evictEntityData
Description copied from interface:Cache
Evict 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:
evictEntityData
in interfaceCache
- Parameters:
entityClass
- The entity type
-
evictEntityData
Description copied from interface:Cache
Evict 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:
evictEntityData
in interfaceCache
- Parameters:
entityName
- The entity name
-
evictEntityData
public void evictEntityData()Description copied from interface:Cache
Evict all cached data from every cache region to which any entity type is assigned.- Specified by:
evictEntityData
in interfaceCache
-
evictNaturalIdData
Description copied from interface:Cache
Evict all cached natural id mappings for the given entity type.- Specified by:
evictNaturalIdData
in interfaceCache
- Parameters:
entityClass
- The entity type
-
evictNaturalIdData
Description copied from interface:Cache
Evict all cached natural id mappings for the entity type with the given name.- Specified by:
evictNaturalIdData
in interfaceCache
- Parameters:
entityName
- The entity name
-
evictNaturalIdData
public void evictNaturalIdData()Description copied from interface:Cache
Evict all cached natural id mappings for every entity type.- Specified by:
evictNaturalIdData
in interfaceCache
-
containsCollection
Description copied from interface:Cache
Determine whether the cache contains an item for the collection with the given role and given identifier.- Specified by:
containsCollection
in interfaceCache
- Parameters:
role
- The name of the collection role in the formpackage.OwnerEntityName.collectionPropertyName
ownerIdentifier
- The identifier of the owning entity- Returns:
- True if the underlying cache contains corresponding data; false otherwise.
-
evictCollectionData
Description copied from interface:Cache
Evict the cached item for the collection with the given role and given identifier, if there is any such item in the cache.- Specified by:
evictCollectionData
in interfaceCache
- Parameters:
role
- The name of the collection role in the formpackage.OwnerEntityName.collectionPropertyName
ownerIdentifier
- The identifier of the owning entity
-
evictCollectionData
Description copied from interface:Cache
Evict all cached data from the cache region to which the given collection role is assigned.- Specified by:
evictCollectionData
in interfaceCache
- Parameters:
role
- The name of the collection role in the formpackage.OwnerEntityName.collectionPropertyName
-
evictCollectionData
public void evictCollectionData()Description copied from interface:Cache
Evict all cache data from every cache region to which some collection role is assigned.- Specified by:
evictCollectionData
in interfaceCache
-
containsQuery
Description copied from interface:Cache
Determine whether the given region name contains cached query results.- Specified by:
containsQuery
in 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:Cache
Evict all cached query results from the default region.- Specified by:
evictDefaultQueryRegion
in interfaceCache
-
evictQueryRegion
Description copied from interface:Cache
Evict all cached query results from the region with the given name.- Specified by:
evictQueryRegion
in interfaceCache
- Parameters:
regionName
- The cache name associated to the queries being cached.
-
evictQueryRegions
public void evictQueryRegions()Description copied from interface:Cache
Evict all cached query results from every region.- Specified by:
evictQueryRegions
in interfaceCache
-
evictRegion
Description copied from interface:Cache
Evict all cached data from the named cache region.- Specified by:
evictRegion
in interfaceCache
-
getRegion
Description copied from interface:CacheImplementor
Get a cache Region by name. If there is both aDomainDataRegion
and aQueryResultsRegion
with the specified name, then theDomainDataRegion
will be returned.- Specified by:
getRegion
in interfaceCacheImplementor
-
getTimestampsCache
Description copied from interface:CacheImplementor
Find the cache data access strategy for Hibernate's timestamps cache. Will returnnull
if Hibernate is not configured for query result caching- Specified by:
getTimestampsCache
in interfaceCacheImplementor
-
getDefaultQueryResultsCache
Description copied from interface:CacheImplementor
Access to the "default" region used to store query results when caching was requested but no region was explicitly named. Will returnnull
if Hibernate is not configured for query result caching- Specified by:
getDefaultQueryResultsCache
in interfaceCacheImplementor
-
getQueryResultsCache
Description copied from interface:CacheImplementor
Get query cache byregion name
or create a new one if none exist. If the region name is null, then default query cache region will be returned. Will returnnull
if Hibernate is not configured for query result caching- Specified by:
getQueryResultsCache
in interfaceCacheImplementor
-
getQueryResultsCacheStrictly
Description copied from interface:CacheImplementor
Get the named QueryResultRegionAccess but not creating one if it does not already exist. This is intended for use by statistics. Will returnnull
if Hibernate is not configured for query result caching or if no such region (yet) exists- Specified by:
getQueryResultsCacheStrictly
in interfaceCacheImplementor
-
close
public void close()Description copied from interface:CacheImplementor
Close this "cache", releasing all underlying resources.- Specified by:
close
in interfaceCacheImplementor
-
getCacheRegionNames
Description copied from interface:CacheImplementor
The unqualified name of all regions. Intended for use withCacheImplementor.getRegion(java.lang.String)
- Specified by:
getCacheRegionNames
in interfaceCacheImplementor
-
contains
-
evict
-
evict
-
unwrap
-