Top Description Fields Constructors Methods
org.hibernate.cache.internal

public Class DisabledCaching

extends Object
implements CacheImplementor
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.spi.CacheImplementor, java.io.Serializable, org.hibernate.engine.spi.CacheImplementor, org.hibernate.Cache, javax.persistence.Cache, org.hibernate.service.Service
Imports
java.io.Serializable, java.util.Collections, .Set, org.hibernate.cache.cfg.spi.DomainDataRegionConfig, org.hibernate.cache.spi.CacheImplementor, .QueryResultsCache, .Region, .RegionFactory, .TimestampsCache, org.hibernate.cache.spi.access.CollectionDataAccess, .EntityDataAccess, .NaturalIdDataAccess, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.metamodel.model.domain.NavigableRole

Deprecated

as a consequence of CacheImplementor being deprecated. See corresponding docs for further information.

CacheImplementor implementation for disabled caching
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final RegionFactory
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Constructor Summary

AccessConstructor and Description
public
DisabledCaching(SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.hibernate.cache.spi.CacheImplementor.close.

Close this "cache", releasing all underlying resources.
public boolean
contains(Class<T>
entity class
cls
,
Object
primary key
primaryKey
)

Implements javax.persistence.Cache.contains.

Whether the cache contains data for the given entity.
public boolean
containsCollection(String
The name of the collection role (in form [owner-entity-name].[collection-property-name]) whose regions should be evicted.
role
,
Serializable
The identifier of the owning entity
ownerIdentifier
)

Implements org.hibernate.Cache.containsCollection.

Determine whether the cache contains data for the given collection.
public boolean
containsEntity(Class<T>
The entity class.
entityClass
,
Serializable
The entity identifier
identifier
)

Implements org.hibernate.Cache.containsEntity.

Determine whether the cache contains data for the given entity "instance".
public boolean
containsEntity(String
The entity name.
entityName
,
Serializable
The entity identifier
identifier
)

Implements org.hibernate.Cache.containsEntity.

Determine whether the cache contains data for the given entity "instance".
public boolean
containsQuery(String
The cache name given to the query.
regionName
)

Implements org.hibernate.Cache.containsQuery.

Determine whether the cache contains data for the given query.
public void
evict(Class<T>
entity class
cls
,
Object
primary key
primaryKey
)

Implements javax.persistence.Cache.evict.

Remove the data for the given entity from the cache.
public void
evict(Class<T>
entity class
cls
)

Implements javax.persistence.Cache.evict.

Remove the data for entities of the specified class (and its subclasses) from the cache.
public void
evictCollectionData(String
The "collection role" (in form [owner-entity-name].[collection-property-name]).
role
,
Serializable
The identifier of the owning entity
ownerIdentifier
)

Implements org.hibernate.Cache.evictCollectionData.

Evicts the cache data for the given identified collection "instance"
public void
evictCollectionData(String
The "collection role" (in form [owner-entity-name].[collection-property-name]).
role
)

Implements org.hibernate.Cache.evictCollectionData.

Evicts cached data for the given collection role
public void
evictCollectionData()

Implements org.hibernate.Cache.evictCollectionData.

Evict cache data for all collections
public void
evictDefaultQueryRegion()

Implements org.hibernate.Cache.evictDefaultQueryRegion.

Evicts all cached query results from the default region.
public void
evictEntityData(Class<T>
The entity class.
entityClass
,
Serializable
The entity identifier
identifier
)

Implements org.hibernate.Cache.evictEntityData.

Evicts the entity data for a particular entity "instance".
public void
evictEntityData(String
The entity name.
entityName
,
Serializable
The entity identifier
identifier
)

Implements org.hibernate.Cache.evictEntityData.

Evicts the entity data for a particular entity "instance".
public void
evictEntityData(Class<T>
The entity class.
entityClass
)

Implements org.hibernate.Cache.evictEntityData.

Evicts all entity data from the given region (i.e. for all entities of type).
public void
evictEntityData(String
The entity name.
entityName
)

Implements org.hibernate.Cache.evictEntityData.

Evicts all entity data from the given region (i.e. for all entities of type).
public void
evictEntityData()

Implements org.hibernate.Cache.evictEntityData.

Evict data from all entity regions.
public void
evictNaturalIdData(Class<T>
The entity class.
entityClass
)

Implements org.hibernate.Cache.evictNaturalIdData.

Evict cached data for the given entity's natural-id
public void
evictNaturalIdData(String
The entity name.
entityName
)

Implements org.hibernate.Cache.evictNaturalIdData.

Evict cached data for the given entity's natural-id
public void
evictNaturalIdData()

Implements org.hibernate.Cache.evictNaturalIdData.

Evict cached data for all natural-ids (for all entities)
public void
evictQueryRegion(String
The cache name associated to the queries being cached.
regionName
)

Implements org.hibernate.Cache.evictQueryRegion.

Evicts all cached query results under the given name.
public void
evictQueryRegions()

Implements org.hibernate.Cache.evictQueryRegions.

Evict data from all query regions.
public void
evictRegion(String regionName)

Implements org.hibernate.Cache.evictRegion.

Evict all data from the named cache region
public Set<String>
public CollectionDataAccess
getCollectionRegionAccess(NavigableRole collectionRole)

Implements org.hibernate.cache.spi.CacheImplementor.getCollectionRegionAccess.

Find the cache data access strategy for the given collection.
public QueryResultsCache
getDefaultQueryResultsCache()

Implements org.hibernate.cache.spi.CacheImplementor.getDefaultQueryResultsCache.

Deprecated as a consequence of QueryResultsCache being deprecated.
Access to the "default" region used to store query results when caching was requested but no region was explicitly named.
public EntityDataAccess
getEntityRegionAccess(NavigableRole
The NavigableRole representation of the root entity
rootEntityName
)

Implements org.hibernate.cache.spi.CacheImplementor.getEntityRegionAccess.

Find the cache data access strategy for an entity.
public Set<NaturalIdDataAccess>
public NaturalIdDataAccess
getNaturalIdCacheRegionAccessStrategy(NavigableRole
The NavigableRole representation of the root entity
rootEntityName
)

Implements org.hibernate.cache.spi.CacheImplementor.getNaturalIdCacheRegionAccessStrategy.

Find the cache data access strategy for the given entity's natural-id cache.
public QueryResultsCache
getQueryResultsCache(String regionName)

Implements org.hibernate.cache.spi.CacheImplementor.getQueryResultsCache.

Deprecated as a consequence of QueryResultsCache being deprecated.
Get query cache by region name or create a new one if none exist.
public QueryResultsCache
getQueryResultsCacheStrictly(String regionName)

Implements org.hibernate.cache.spi.CacheImplementor.getQueryResultsCacheStrictly.

Deprecated as a consequence of QueryResultsCache being deprecated.
Get the named QueryResultRegionAccess but not creating one if it does not already exist.
public Region
getRegion(String fullRegionName)

Implements org.hibernate.cache.spi.CacheImplementor.getRegion.

Get a cache Region by name.
public RegionFactory
getRegionFactory()

Implements org.hibernate.cache.spi.CacheImplementor.getRegionFactory.

The underlying RegionFactory in use.
public String[]
getSecondLevelCacheRegionNames()

Implements org.hibernate.cache.spi.CacheImplementor.getSecondLevelCacheRegionNames.

Get the *qualified* names of all regions caching entity and collection data.
public SessionFactoryImplementor
getSessionFactory()

Implements org.hibernate.cache.spi.CacheImplementor.getSessionFactory.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Access to the SessionFactory this Cache is bound to.
public TimestampsCache
getTimestampsCache()

Implements org.hibernate.cache.spi.CacheImplementor.getTimestampsCache.

Deprecated as a consequence of TimestampsCache being deprecated.
Find the cache data access strategy for Hibernate's timestamps cache.
public void
prime(Set<DomainDataRegionConfig> cacheRegionConfigs)

Implements org.hibernate.cache.spi.CacheImplementor.prime.

An initialization phase allowing the caching provider to prime itself from the passed configs
public <T> T
unwrap(Class<T>
the class of the object to be returned. This is normally either the underlying Cache implementation class or an interface that it implements.
cls
)

Implements javax.persistence.Cache.unwrap.

Return an object of the specified type to allow access to the provider-specific API.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

regionFactoryback to summary
private final RegionFactory regionFactory
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Constructor Detail

DisabledCachingback to summary
public DisabledCaching(SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

closeback to summary
public void close()

Implements org.hibernate.cache.spi.CacheImplementor.close.

Doc from org.hibernate.cache.spi.CacheImplementor.close.

Close this "cache", releasing all underlying resources.

Annotations
@Override
containsback to summary
public boolean contains(Class<T> cls, Object primaryKey)

Implements javax.persistence.Cache.contains.

Doc from javax.persistence.Cache.contains.

Whether the cache contains data for the given entity.

Parameters
cls:Class<T>

entity class

primaryKey:Object

primary key

Returns:boolean

boolean indicating whether the entity is in the cache

Annotations
@Override
containsCollectionback to summary
public boolean containsCollection(String role, Serializable ownerIdentifier)

Implements org.hibernate.Cache.containsCollection.

Doc from org.hibernate.Cache.containsCollection.

Determine whether the cache contains data for the given collection.

The semantic here is whether the cache contains data visible for the current call context.

Parameters
role:String

The name of the collection role (in form [owner-entity-name].[collection-property-name]) whose regions should be evicted.

ownerIdentifier:Serializable

The identifier of the owning entity

Returns:boolean

True if the underlying cache contains corresponding data; false otherwise.

Annotations
@Override
containsEntityback to summary
public boolean containsEntity(Class<T> entityClass, Serializable identifier)

Implements org.hibernate.Cache.containsEntity.

Doc from org.hibernate.Cache.containsEntity.

Determine 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.

Parameters
entityClass:Class<T>

The entity class.

identifier:Serializable

The entity identifier

Returns:boolean

True if the underlying cache contains corresponding data; false otherwise.

Annotations
@Override
containsEntityback to summary
public boolean containsEntity(String entityName, Serializable identifier)

Implements org.hibernate.Cache.containsEntity.

Doc from org.hibernate.Cache.containsEntity.

Determine 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.

Parameters
entityName:String

The entity name.

identifier:Serializable

The entity identifier

Returns:boolean

True if the underlying cache contains corresponding data; false otherwise.

Annotations
@Override
containsQueryback to summary
public boolean containsQuery(String regionName)

Implements org.hibernate.Cache.containsQuery.

Doc from org.hibernate.Cache.containsQuery.

Determine 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.

Parameters
regionName:String

The cache name given to the query.

Returns:boolean

True if the underlying cache contains corresponding data; false otherwise.

Annotations
@Override
evictback to summary
public void evict(Class<T> cls, Object primaryKey)

Implements javax.persistence.Cache.evict.

Doc from javax.persistence.Cache.evict.

Remove the data for the given entity from the cache.

Parameters
cls:Class<T>

entity class

primaryKey:Object

primary key

Annotations
@Override
evictback to summary
public void evict(Class<T> cls)

Implements javax.persistence.Cache.evict.

Doc from javax.persistence.Cache.evict.

Remove the data for entities of the specified class (and its subclasses) from the cache.

Parameters
cls:Class<T>

entity class

Annotations
@Override
evictCollectionDataback to summary
public void evictCollectionData(String role, Serializable ownerIdentifier)

Implements org.hibernate.Cache.evictCollectionData.

Doc from org.hibernate.Cache.evictCollectionData.

Evicts the cache data for the given identified collection "instance"

Parameters
role:String

The "collection role" (in form [owner-entity-name].[collection-property-name]).

ownerIdentifier:Serializable

The identifier of the owning entity

Annotations
@Override
evictCollectionDataback to summary
public void evictCollectionData(String role)

Implements org.hibernate.Cache.evictCollectionData.

Doc from org.hibernate.Cache.evictCollectionData.

Evicts cached data for the given collection role

Parameters
role:String

The "collection role" (in form [owner-entity-name].[collection-property-name]).

Annotations
@Override
evictCollectionDataback to summary
public void evictCollectionData()

Implements org.hibernate.Cache.evictCollectionData.

Doc from org.hibernate.Cache.evictCollectionData.

Evict cache data for all collections

Annotations
@Override
evictDefaultQueryRegionback to summary
public void evictDefaultQueryRegion()

Implements org.hibernate.Cache.evictDefaultQueryRegion.

Doc from org.hibernate.Cache.evictDefaultQueryRegion.

Evicts all cached query results from the default region.

Annotations
@Override
evictEntityDataback to summary
public void evictEntityData(Class<T> entityClass, Serializable identifier)

Implements org.hibernate.Cache.evictEntityData.

Doc from org.hibernate.Cache.evictEntityData.

Evicts the entity data for a particular entity "instance".

Parameters
entityClass:Class<T>

The entity class.

identifier:Serializable

The entity identifier

Annotations
@Override
evictEntityDataback to summary
public void evictEntityData(String entityName, Serializable identifier)

Implements org.hibernate.Cache.evictEntityData.

Doc from org.hibernate.Cache.evictEntityData.

Evicts the entity data for a particular entity "instance".

Parameters
entityName:String

The entity name.

identifier:Serializable

The entity identifier

Annotations
@Override
evictEntityDataback to summary
public void evictEntityData(Class<T> entityClass)

Implements org.hibernate.Cache.evictEntityData.

Doc from org.hibernate.Cache.evictEntityData.

Evicts all entity data from the given region (i.e. for all entities of type).

Parameters
entityClass:Class<T>

The entity class.

Annotations
@Override
evictEntityDataback to summary
public void evictEntityData(String entityName)

Implements org.hibernate.Cache.evictEntityData.

Doc from org.hibernate.Cache.evictEntityData.

Evicts all entity data from the given region (i.e. for all entities of type).

Parameters
entityName:String

The entity name.

Annotations
@Override
evictEntityDataback to summary
public void evictEntityData()

Implements org.hibernate.Cache.evictEntityData.

Doc from org.hibernate.Cache.evictEntityData.

Evict data from all entity regions.

Annotations
@Override
evictNaturalIdDataback to summary
public void evictNaturalIdData(Class<T> entityClass)

Implements org.hibernate.Cache.evictNaturalIdData.

Doc from org.hibernate.Cache.evictNaturalIdData.

Evict cached data for the given entity's natural-id

Parameters
entityClass:Class<T>

The entity class.

Annotations
@Override
evictNaturalIdDataback to summary
public void evictNaturalIdData(String entityName)

Implements org.hibernate.Cache.evictNaturalIdData.

Doc from org.hibernate.Cache.evictNaturalIdData.

Evict cached data for the given entity's natural-id

Parameters
entityName:String

The entity name.

Annotations
@Override
evictNaturalIdDataback to summary
public void evictNaturalIdData()

Implements org.hibernate.Cache.evictNaturalIdData.

Doc from org.hibernate.Cache.evictNaturalIdData.

Evict cached data for all natural-ids (for all entities)

Annotations
@Override
evictQueryRegionback to summary
public void evictQueryRegion(String regionName)

Implements org.hibernate.Cache.evictQueryRegion.

Doc from org.hibernate.Cache.evictQueryRegion.

Evicts all cached query results under the given name.

Parameters
regionName:String

The cache name associated to the queries being cached.

Annotations
@Override
evictQueryRegionsback to summary
public void evictQueryRegions()

Implements org.hibernate.Cache.evictQueryRegions.

Doc from org.hibernate.Cache.evictQueryRegions.

Evict data from all query regions.

Annotations
@Override
evictRegionback to summary
public void evictRegion(String regionName)

Implements org.hibernate.Cache.evictRegion.

Doc from org.hibernate.Cache.evictRegion.

Evict all data from the named cache region

Annotations
@Override
getCacheRegionNamesback to summary
public Set<String> getCacheRegionNames()

Implements org.hibernate.cache.spi.CacheImplementor.getCacheRegionNames.

Doc from org.hibernate.cache.spi.CacheImplementor.getCacheRegionNames.

The unqualified name of all regions. Intended for use with getRegion

Annotations
@Override
getCollectionRegionAccessback to summary
public CollectionDataAccess getCollectionRegionAccess(NavigableRole collectionRole)

Implements org.hibernate.cache.spi.CacheImplementor.getCollectionRegionAccess.

Doc from org.hibernate.cache.spi.CacheImplementor.getCollectionRegionAccess.

Find the cache data access strategy for the given collection. Will return null when the collection is not configured for caching.

Annotations
@Override
getDefaultQueryResultsCacheback to summary
public QueryResultsCache getDefaultQueryResultsCache()

Implements org.hibernate.cache.spi.CacheImplementor.getDefaultQueryResultsCache.

Doc from org.hibernate.cache.spi.CacheImplementor.getDefaultQueryResultsCache.

Deprecated

as a consequence of QueryResultsCache being deprecated. See corresponding docs for further information.

Access to the "default" region used to store query results when caching was requested but no region was explicitly named. Will return null if Hibernate is not configured for query result caching

Annotations
@Override
getEntityRegionAccessback to summary
public EntityDataAccess getEntityRegionAccess(NavigableRole rootEntityName)

Implements org.hibernate.cache.spi.CacheImplementor.getEntityRegionAccess.

Doc from org.hibernate.cache.spi.CacheImplementor.getEntityRegionAccess.

Find the cache data access strategy for an entity. Will return null when the entity is not configured for caching.

Parameters
rootEntityName:NavigableRole

The NavigableRole representation of the root entity

Annotations
@Override
getNaturalIdAccessesInRegionback to summary
public Set<NaturalIdDataAccess> getNaturalIdAccessesInRegion(String regionName)

Implements org.hibernate.cache.spi.CacheImplementor.getNaturalIdAccessesInRegion.

Annotations
@Override
getNaturalIdCacheRegionAccessStrategyback to summary
public NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName)

Implements org.hibernate.cache.spi.CacheImplementor.getNaturalIdCacheRegionAccessStrategy.

Doc from org.hibernate.cache.spi.CacheImplementor.getNaturalIdCacheRegionAccessStrategy.

Find the cache data access strategy for the given entity's natural-id cache. Will return null when the entity does not define a natural-id, or its natural-id is not configured for caching.

Parameters
rootEntityName:NavigableRole

The NavigableRole representation of the root entity

Annotations
@Override
getQueryResultsCacheback to summary
public QueryResultsCache getQueryResultsCache(String regionName)

Implements org.hibernate.cache.spi.CacheImplementor.getQueryResultsCache.

Doc from org.hibernate.cache.spi.CacheImplementor.getQueryResultsCache.

Deprecated

as a consequence of QueryResultsCache being deprecated. See corresponding docs for further information.

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 return null if Hibernate is not configured for query result caching

Annotations
@Override
getQueryResultsCacheStrictlyback to summary
public QueryResultsCache getQueryResultsCacheStrictly(String regionName)

Implements org.hibernate.cache.spi.CacheImplementor.getQueryResultsCacheStrictly.

Doc from org.hibernate.cache.spi.CacheImplementor.getQueryResultsCacheStrictly.

Deprecated

as a consequence of QueryResultsCache being deprecated. See corresponding docs for further information.

Get the named QueryResultRegionAccess but not creating one if it does not already exist. This is intended for use by statistics. Will return null if Hibernate is not configured for query result caching or if no such region (yet) exists

Annotations
@Override
getRegionback to summary
public Region getRegion(String fullRegionName)

Implements org.hibernate.cache.spi.CacheImplementor.getRegion.

Doc from org.hibernate.cache.spi.CacheImplementor.getRegion.

Get a cache Region by name. If there is both a DomainDataRegion and a QueryResultsRegion with the specified name, then the DomainDataRegion will be returned.

Annotations
@Override
getRegionFactoryback to summary
public RegionFactory getRegionFactory()

Implements org.hibernate.cache.spi.CacheImplementor.getRegionFactory.

Doc from org.hibernate.cache.spi.CacheImplementor.getRegionFactory.

The underlying RegionFactory in use.

Annotations
@Override
getSecondLevelCacheRegionNamesback to summary
public String[] getSecondLevelCacheRegionNames()

Implements org.hibernate.cache.spi.CacheImplementor.getSecondLevelCacheRegionNames.

Doc from org.hibernate.cache.spi.CacheImplementor.getSecondLevelCacheRegionNames.

Get the *qualified* names of all regions caching entity and collection data.

Returns:String[]

All cache region names

Annotations
@Override
getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Implements org.hibernate.cache.spi.CacheImplementor.getSessionFactory.

Doc from org.hibernate.Cache.getSessionFactory.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Access to the SessionFactory this Cache is bound to.

Returns:SessionFactoryImplementor

The SessionFactory

Annotations
@Override
getTimestampsCacheback to summary
public TimestampsCache getTimestampsCache()

Implements org.hibernate.cache.spi.CacheImplementor.getTimestampsCache.

Doc from org.hibernate.cache.spi.CacheImplementor.getTimestampsCache.

Deprecated

as a consequence of TimestampsCache being deprecated. See corresponding docs for further information.

Find the cache data access strategy for Hibernate's timestamps cache. Will return null if Hibernate is not configured for query result caching

Annotations
@Override
primeback to summary
public void prime(Set<DomainDataRegionConfig> cacheRegionConfigs)

Implements org.hibernate.cache.spi.CacheImplementor.prime.

Doc from org.hibernate.cache.spi.CacheImplementor.prime.

An initialization phase allowing the caching provider to prime itself from the passed configs

Annotations
@Override
unwrapback to summary
public <T> T unwrap(Class<T> cls)

Implements javax.persistence.Cache.unwrap.

Doc from javax.persistence.Cache.unwrap.

Return an object of the specified type to allow access to the provider-specific API. If the provider's Cache implementation does not support the specified class, the PersistenceException is thrown.

Parameters
cls:Class<T>

the class of the object to be returned. This is normally either the underlying Cache implementation class or an interface that it implements.

Returns:T

an instance of the specified class

Annotations
@Override
@SuppressWarnings:unchecked