public class DisabledCaching extends Object implements CacheImplementor
| Constructor and Description |
|---|
DisabledCaching(SessionFactoryImplementor sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this "cache", releasing all underlying resources.
|
boolean |
contains(Class cls,
Object primaryKey)
Whether the cache contains data for the given entity.
|
boolean |
containsCollection(String role,
Serializable ownerIdentifier)
Determine whether the cache contains data for the given collection.
|
boolean |
containsEntity(Class entityClass,
Serializable identifier)
Determine whether the cache contains data for the given entity "instance".
|
boolean |
containsEntity(String entityName,
Serializable identifier)
Determine whether the cache contains data for the given entity "instance".
|
boolean |
containsQuery(String regionName)
Determine whether the cache contains data for the given query.
|
void |
evict(Class cls)
Remove the data for entities of the specified class (and its
subclasses) from the cache.
|
void |
evict(Class cls,
Object primaryKey)
Remove the data for the given entity from the cache.
|
void |
evictCollectionData()
Evict cache data for all collections
|
void |
evictCollectionData(String role)
Evicts cached data for the given collection role
|
void |
evictCollectionData(String role,
Serializable ownerIdentifier)
Evicts the cache data for the given identified collection "instance"
|
void |
evictDefaultQueryRegion()
Evicts all cached query results from the default region.
|
void |
evictEntityData()
Evict data from all entity regions.
|
void |
evictEntityData(Class entityClass)
Evicts all entity data from the given region (i.e.
|
void |
evictEntityData(Class entityClass,
Serializable identifier)
Evicts the entity data for a particular entity "instance".
|
void |
evictEntityData(String entityName)
Evicts all entity data from the given region (i.e.
|
void |
evictEntityData(String entityName,
Serializable identifier)
Evicts the entity data for a particular entity "instance".
|
void |
evictNaturalIdData()
Evict cached data for all natural-ids (for all entities)
|
void |
evictNaturalIdData(Class entityClass)
Evict cached data for the given entity's natural-id
|
void |
evictNaturalIdData(String entityName)
Evict cached data for the given entity's natural-id
|
void |
evictQueryRegion(String regionName)
Evicts all cached query results under the given name.
|
void |
evictQueryRegions()
Evict data from all query regions.
|
void |
evictRegion(String regionName)
Evict all data from the named cache region
|
Set<String> |
getCacheRegionNames()
The unqualified name of all regions.
|
CollectionDataAccess |
getCollectionRegionAccess(NavigableRole collectionRole)
Find the cache data access strategy for the given collection.
|
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)
Find the cache data access strategy for an entity.
|
Set<NaturalIdDataAccess> |
getNaturalIdAccessesInRegion(String regionName) |
NaturalIdDataAccess |
getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)
Find the cache data access strategy for the given entity's natural-id cache.
|
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 fullRegionName)
Get a cache Region by name
|
RegionFactory |
getRegionFactory()
The underlying RegionFactory in use.
|
String[] |
getSecondLevelCacheRegionNames()
Get the *qualified* names of all regions caching entity and collection data.
|
SessionFactoryImplementor |
getSessionFactory()
Access to the SessionFactory this Cache is bound to.
|
TimestampsCache |
getTimestampsCache()
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 |
unwrap(Class<T> cls)
Return an object of the specified type to allow access to the
provider-specific API.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevictQueries, getDefaultQueryCache, getQueryCache, getQueryCache, getRegionByLegacyName, getUpdateTimestampsCache, unqualifyRegionNameevictAll, evictAllRegions, evictCollection, evictCollectionRegion, evictCollectionRegions, evictEntity, evictEntity, evictEntityRegion, evictEntityRegion, evictEntityRegions, evictNaturalIdRegion, evictNaturalIdRegion, evictNaturalIdRegionspublic DisabledCaching(SessionFactoryImplementor sessionFactory)
public SessionFactoryImplementor getSessionFactory()
CachegetSessionFactory in interface CacheImplementorpublic RegionFactory getRegionFactory()
CacheImplementorgetRegionFactory in interface CacheImplementorpublic void prime(Set<DomainDataRegionConfig> cacheRegionConfigs)
CacheImplementorprime in interface CacheImplementorpublic boolean containsEntity(Class entityClass, Serializable identifier)
CacheentityClass - The entity class.identifier - The entity identifierpublic boolean containsEntity(String entityName, Serializable identifier)
CacheentityName - The entity name.identifier - The entity identifierpublic void evictEntityData(Class entityClass, Serializable identifier)
CacheentityClass - The entity class.identifier - The entity identifierpublic void evictEntityData(String entityName, Serializable identifier)
CacheentityName - The entity name.identifier - The entity identifierpublic void evictEntityData(Class entityClass)
CacheentityClass - The entity class.public void evictEntityData(String entityName)
CacheentityName - The entity name.public void evictEntityData()
Cachepublic void evictNaturalIdData(Class entityClass)
CacheentityClass - The entity class.public void evictNaturalIdData(String entityName)
CacheentityName - The entity name.public void evictNaturalIdData()
Cachepublic boolean containsCollection(String role, Serializable ownerIdentifier)
Cacherole - 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 entitypublic void evictCollectionData(String role, Serializable ownerIdentifier)
Cacherole - The "collection role" (in form [owner-entity-name].[collection-property-name]).ownerIdentifier - The identifier of the owning entitypublic void evictCollectionData(String role)
Cacherole - The "collection role" (in form [owner-entity-name].[collection-property-name]).public void evictCollectionData()
Cachepublic boolean containsQuery(String regionName)
CacheregionName - The cache name given to the query.public void evictDefaultQueryRegion()
Cachepublic void evictQueryRegion(String regionName)
CacheregionName - The cache name associated to the queries being cached.public void evictQueryRegions()
Cachepublic void evictRegion(String regionName)
Cachepublic Region getRegion(String fullRegionName)
CacheImplementorgetRegion in interface CacheImplementorpublic TimestampsCache getTimestampsCache()
CacheImplementornull if Hibernate is not configured for query result cachinggetTimestampsCache in interface CacheImplementorpublic QueryResultsCache getDefaultQueryResultsCache()
CacheImplementornull
if Hibernate is not configured for query result cachinggetDefaultQueryResultsCache in interface CacheImplementorpublic QueryResultsCache getQueryResultsCache(String regionName)
CacheImplementornull if Hibernate is not configured for query result cachinggetQueryResultsCache in interface CacheImplementorpublic QueryResultsCache getQueryResultsCacheStrictly(String regionName)
CacheImplementornull if Hibernate is not configured for query result
caching or if no such region (yet) existsgetQueryResultsCacheStrictly in interface CacheImplementorpublic void close()
CacheImplementorclose in interface CacheImplementorpublic String[] getSecondLevelCacheRegionNames()
CacheImplementorgetSecondLevelCacheRegionNames in interface CacheImplementorpublic Set<String> getCacheRegionNames()
CacheImplementorCacheImplementor.getRegion(java.lang.String)getCacheRegionNames in interface CacheImplementorpublic EntityDataAccess getEntityRegionAccess(NavigableRole rootEntityName)
CacheImplementornull when the entity is not configured for caching.getEntityRegionAccess in interface CacheImplementorrootEntityName - The NavigableRole representation of the root entitypublic NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)
CacheImplementornull when the entity does not define a natural-id, or its
natural-id is not configured for caching.getNaturalIdCacheRegionAccessStrategy in interface CacheImplementorrootEntityName - The NavigableRole representation of the root entitypublic CollectionDataAccess getCollectionRegionAccess(NavigableRole collectionRole)
CacheImplementornull when the collection is not configured for caching.getCollectionRegionAccess in interface CacheImplementorpublic boolean contains(Class cls, Object primaryKey)
Cachepublic void evict(Class cls, Object primaryKey)
Cachepublic void evict(Class cls)
Cachepublic <T> T unwrap(Class<T> cls)
Cachepublic Set<NaturalIdDataAccess> getNaturalIdAccessesInRegion(String regionName)
getNaturalIdAccessesInRegion in interface CacheImplementorCopyright © 2019 JBoss by Red Hat. All rights reserved.