|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.internal.CacheImpl
public class CacheImpl
| Constructor Summary | |
|---|---|
CacheImpl(SessionFactoryImplementor sessionFactory)
|
|
| Method Summary | |
|---|---|
void |
addCacheRegion(String name,
Region region)
Add Region to this Cache scope. |
void |
close()
Close all cache regions. |
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 |
evictCollection(String role,
Serializable ownerIdentifier)
Evicts the cache data for the given identified collection instance. |
void |
evictCollectionRegion(String role)
Evicts all entity data from the given region (i.e. |
void |
evictCollectionRegions()
Evict data from all collection regions. |
void |
evictDefaultQueryRegion()
Evicts all cached query results from the default region. |
void |
evictEntity(Class entityClass,
Serializable identifier)
Evicts the entity data for a particular entity "instance". |
void |
evictEntity(String entityName,
Serializable identifier)
Evicts the entity data for a particular entity "instance". |
void |
evictEntityRegion(Class entityClass)
Evicts all entity data from the given region (i.e. |
void |
evictEntityRegion(String entityName)
Evicts all entity data from the given region (i.e. |
void |
evictEntityRegions()
Evict data from all entity regions. |
void |
evictNaturalIdRegion(Class entityClass)
Evicts all naturalId data from the given region (i.e. |
void |
evictNaturalIdRegion(String entityName)
Evicts all naturalId data from the given region (i.e. |
void |
evictNaturalIdRegions()
Evict data from all naturalId regions. |
void |
evictQueries()
Clean up the default QueryCache. |
void |
evictQueryRegion(String regionName)
Evicts all cached query results under the given name. |
void |
evictQueryRegions()
Evict data from all query regions. |
Map<String,Region> |
getAllSecondLevelCacheRegions()
Get all cache regions, including query cache. |
Region |
getNaturalIdCacheRegion(String regionName)
Get natural id cache region by its name. |
QueryCache |
getQueryCache()
Get the default QueryCache. |
QueryCache |
getQueryCache(String regionName)
Get query cache by region name or create a new one if none exist. |
RegionFactory |
getRegionFactory()
|
Region |
getSecondLevelCacheRegion(String regionName)
Get second level cache region by its name. |
UpdateTimestampsCache |
getUpdateTimestampsCache()
Get UpdateTimestampsCache instance managed by the SessionFactory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheImpl(SessionFactoryImplementor sessionFactory)
| Method Detail |
|---|
public boolean containsEntity(Class entityClass,
Serializable identifier)
Cache
containsEntity in interface CacheentityClass - The entity class.identifier - The entity identifier
public boolean containsEntity(String entityName,
Serializable identifier)
Cache
containsEntity in interface CacheentityName - The entity name.identifier - The entity identifier
public void evictEntity(Class entityClass,
Serializable identifier)
Cache
evictEntity in interface CacheentityClass - The entity class.identifier - The entity identifier
public void evictEntity(String entityName,
Serializable identifier)
Cache
evictEntity in interface CacheentityName - The entity name.identifier - The entity identifierpublic void evictEntityRegion(Class entityClass)
Cache
evictEntityRegion in interface CacheentityClass - The entity class.public void evictEntityRegion(String entityName)
Cache
evictEntityRegion in interface CacheentityName - The entity name.public void evictEntityRegions()
Cache
evictEntityRegions in interface Cachepublic void evictNaturalIdRegion(Class entityClass)
Cache
evictNaturalIdRegion in interface CacheentityClass - The naturalId class.public void evictNaturalIdRegion(String entityName)
Cache
evictNaturalIdRegion in interface CacheentityName - The naturalId name.public void evictNaturalIdRegions()
Cache
evictNaturalIdRegions in interface Cache
public boolean containsCollection(String role,
Serializable ownerIdentifier)
Cache
containsCollection in interface 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 entity
public void evictCollection(String role,
Serializable ownerIdentifier)
Cache
evictCollection in interface Cacherole - The "collection role" (in form [owner-entity-name].[collection-property-name]).ownerIdentifier - The identifier of the owning entitypublic void evictCollectionRegion(String role)
Cache
evictCollectionRegion in interface Cacherole - The "collection role" (in form [owner-entity-name].[collection-property-name]).public void evictCollectionRegions()
Cache
evictCollectionRegions in interface Cachepublic boolean containsQuery(String regionName)
Cache
containsQuery in interface CacheregionName - The cache name given to the query.
public void evictDefaultQueryRegion()
Cache
evictDefaultQueryRegion in interface Cachepublic void evictQueryRegion(String regionName)
Cache
evictQueryRegion in interface CacheregionName - The cache name associated to the queries being cached.public void evictQueryRegions()
Cache
evictQueryRegions in interface Cachepublic void close()
CacheImplementor
close in interface CacheImplementorpublic QueryCache getQueryCache()
CacheImplementorQueryCache.
getQueryCache in interface CacheImplementor
public QueryCache getQueryCache(String regionName)
throws HibernateException
CacheImplementor
getQueryCache in interface CacheImplementorregionName - Query cache region name.
QueryCache associated with the region name, or default query cache if the region name is null.
HibernateException - HibernateException maybe thrown when the creation of new QueryCache instance.
public void addCacheRegion(String name,
Region region)
CacheImplementorRegion to this Cache scope.
addCacheRegion in interface CacheImplementorname - The region name.region - The Region instance.public UpdateTimestampsCache getUpdateTimestampsCache()
CacheImplementorUpdateTimestampsCache instance managed by the SessionFactory.
getUpdateTimestampsCache in interface CacheImplementor
public void evictQueries()
throws HibernateException
CacheImplementorQueryCache.
evictQueries in interface CacheImplementorHibernateExceptionpublic Region getSecondLevelCacheRegion(String regionName)
CacheImplementor
getSecondLevelCacheRegion in interface CacheImplementorregionName - The region name.
public Region getNaturalIdCacheRegion(String regionName)
CacheImplementor
getNaturalIdCacheRegion in interface CacheImplementorregionName - The region name.
public Map<String,Region> getAllSecondLevelCacheRegions()
CacheImplementor
getAllSecondLevelCacheRegions in interface CacheImplementorpublic RegionFactory getRegionFactory()
getRegionFactory in interface CacheImplementorRegionFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||