CacheImplementor service used when the second-level cache is enabled.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final QueryResultsCache | |
| private final Map | |
| private final Map | |
| private final Set | |
| private static final CoreMessageLogger | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final RegionFactory | |
| private final Map | |
| private final SessionFactoryImplementor | sessionFactory
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| private final TimestampsCache |
| Access | Constructor and Description |
|---|---|
| public | EnabledCaching(SessionFactoryImplementor sessionFactory)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements org. |
| public boolean | contains(Class<T>
entity class cls, Object primary key primaryKey)Implements jakarta. |
| public boolean | containsCollection(String
The name of the collection role in the form
role, Object package.OwnerEntityName.collectionPropertyNameThe identifier of the owning entity ownerIdentifier)Implements org. |
| public boolean | containsEntity(Class<?>
The entity type entityClass, Object The entity identifier identifier)Implements org. |
| public boolean | containsEntity(String
The entity name entityName, Object The entity identifier identifier)Implements org. |
| public boolean | containsQuery(String
The name of a cache region to which some query is assigned regionName)Implements org. |
| public void | evict(Class<T>
entity class cls, Object primary key primaryKey)Implements jakarta. |
| public void | evict(Class<T>
entity class cls)Implements jakarta. |
| public void | evictCollectionData(String
The name of the collection role in the form
role, Object package.OwnerEntityName.collectionPropertyNameThe identifier of the owning entity ownerIdentifier)Implements org. |
| public void | evictCollectionData(String
The name of the collection role in the form
role)package.OwnerEntityName.collectionPropertyNameImplements org. |
| private void | |
| private void | |
| public void | evictCollectionData()
Implements org. |
| public void | evictDefaultQueryRegion()
Implements org. |
| public void | evictEntityData(Class<?>
The entity type entityClass, Object The entity identifier identifier)Implements org. |
| public void | evictEntityData(String
The entity name entityName, Object The entity identifier identifier)Implements org. |
| public void | evictEntityData(Class<?>
The entity type entityClass)Implements org. |
| public void | evictEntityData(String
The entity name entityName)Implements org. |
| protected void | |
| private void | |
| public void | evictEntityData()
Implements org. |
| public void | evictNaturalIdData(Class<?>
The entity type entityClass)Implements org. |
| public void | evictNaturalIdData(String
The entity name entityName)Implements org. |
| private void | |
| public void | evictNaturalIdData()
Implements org. |
| private void | |
| public void | evictQueryRegion(String
The cache name associated to the queries being cached. regionName)Implements org. |
| public void | evictQueryRegions()
Implements org. |
| private void | |
| public void | evictRegion(String regionName)
Implements org. |
| public Set | getCacheRegionNames()
Implements org. |
| public CollectionDataAccess | getCollectionRegionAccess(NavigableRole collectionRole)
Implements org.
Deprecated
Find the cache data access strategy for the given collection.
|
| public QueryResultsCache | getDefaultQueryResultsCache()
Implements org. |
| public CacheKeysFactory | getEnforcedCacheKeysFactory()
Implements org. CacheKeysFactory explicitly specified as part of
the bootstrap by the user, by some "container", etc.
If this method returns a non-null value, it is expected that
RegionFactory implementors will use to be its
CacheKeysFactory and return it when asked later.
|
| public EntityDataAccess | getEntityRegionAccess(NavigableRole
The NavigableRole representation of the root entity rootEntityName)Implements org.
Deprecated
Find the cache data access strategy for an entity.
|
| public NaturalIdDataAccess | getNaturalIdCacheRegionAccessStrategy(NavigableRole
The NavigableRole representation of the root entity rootEntityName)Implements org.
Deprecated
Find the cache data access strategy for the given entity's natural-id cache.
|
| public QueryResultsCache | getQueryResultsCache(String regionName)
Implements org. region name or create a new one if none exist.
|
| public QueryResultsCache | getQueryResultsCacheStrictly(String regionName)
Implements org. |
| public Region | getRegion(String regionName)
Implements org. |
| public RegionFactory | getRegionFactory()
Implements org. |
| public SessionFactoryImplementor | getSessionFactory()
Implements org.
Deprecated
as a consequence of
Access to the SessionFactory for which a Region is
being built.
SessionFactoryImplementor being deprecated.
|
| public TimestampsCache | getTimestampsCache()
Implements org. |
| protected QueryResultsRegion | |
| protected QueryResultsCache | |
| public void | prime(Set<DomainDataRegionConfig> cacheRegionConfigs)
Implements org. |
| 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 jakarta. |
| collectionAccessMap | back to summary |
|---|---|
| private final Map<NavigableRole, CollectionDataAccess> collectionAccessMap | |
| defaultQueryResultsCache | back to summary |
|---|---|
| private final QueryResultsCache defaultQueryResultsCache | |
| entityAccessMap | back to summary |
|---|---|
| private final Map<NavigableRole, EntityDataAccess> entityAccessMap | |
| legacyNaturalIdAccessesForRegion | back to summary |
|---|---|
| private final Map<String, Set<NaturalIdDataAccess>> legacyNaturalIdAccessesForRegion | |
| legacySecondLevelCacheNames | back to summary |
|---|---|
| private final Set<String> legacySecondLevelCacheNames | |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| namedQueryResultsCacheMap | back to summary |
|---|---|
| private final Map<String, QueryResultsCache> namedQueryResultsCacheMap | |
| naturalIdAccessMap | back to summary |
|---|---|
| private final Map<NavigableRole, NaturalIdDataAccess> naturalIdAccessMap | |
| queryResultsRegionsByDuplicateName | back to summary |
|---|---|
| private final Map<String, QueryResultsRegion> queryResultsRegionsByDuplicateName | |
| regionFactory | back to summary |
|---|---|
| private final RegionFactory regionFactory | |
| regionsByName | back to summary |
|---|---|
| private final Map<String, Region> regionsByName | |
| sessionFactory | back to summary |
|---|---|
| private final SessionFactoryImplementor sessionFactory
Deprecated as a consequence of | |
| timestampsCache | back to summary |
|---|---|
| private final TimestampsCache timestampsCache | |
| EnabledCaching | back to summary |
|---|---|
| public EnabledCaching(SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of | |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org. Close this "cache", releasing all underlying resources.
| |
| contains | back to summary |
|---|---|
| public boolean contains(Class<T> cls, Object primaryKey) Implements jakarta. Doc from jakarta. Whether the cache contains data for the given entity. | |
| containsCollection | back to summary |
|---|---|
| public boolean containsCollection(String role, Object ownerIdentifier) Implements org. Doc from org. Determine whether the cache contains an item for the collection with the given role and given identifier. | |
| containsEntity | back to summary |
|---|---|
| public boolean containsEntity(Class<?> entityClass, Object identifier) Implements org. Doc from org. Determine whether the cache contains an item for the entity of the given type, and with the given identifier. | |
| containsEntity | back to summary |
|---|---|
| public boolean containsEntity(String entityName, Object identifier) Implements org. Doc from org. Determine whether the cache contains an item for the entity of the type with the given name, and with the given identifier. | |
| containsQuery | back to summary |
|---|---|
| public boolean containsQuery(String regionName) Implements org. Doc from org. Determine whether the given region name contains cached query results. | |
| evict | back to summary |
|---|---|
| public void evict(Class<T> cls, Object primaryKey) Implements jakarta. Doc from jakarta. Remove the data for the given entity from the cache. | |
| evict | back to summary |
|---|---|
| public void evict(Class<T> cls) Implements jakarta. Doc from jakarta. Remove the data for entities of the specified class (and its subclasses) from the cache. | |
| evictCollectionData | back to summary |
|---|---|
| public void evictCollectionData(String role, Object ownerIdentifier) Implements org. Doc from org. Evict the cached item for the collection with the given role and given identifier, if there is any such item in the cache. | |
| evictCollectionData | back to summary |
|---|---|
| public void evictCollectionData(String role) Implements org. Doc from org. Evict all cached data from the cache region to which the given collection role is assigned. | |
| evictCollectionData | back to summary |
|---|---|
| private void evictCollectionData(CollectionPersister collectionDescriptor) | |
| evictCollectionData | back to summary |
|---|---|
| private void evictCollectionData(NavigableRole navigableRole, CollectionDataAccess cacheAccess) | |
| evictCollectionData | back to summary |
|---|---|
| public void evictCollectionData() Implements org. Doc from org. Evict all cache data from every cache region to which some collection role is assigned.
| |
| evictDefaultQueryRegion | back to summary |
|---|---|
| public void evictDefaultQueryRegion() Implements org. Doc from org. Evict all cached query results from the default region.
| |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(Class<?> entityClass, Object identifier) Implements org. Doc from org. 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. | |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(String entityName, Object identifier) Implements org. Doc from org. 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. | |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(Class<?> entityClass) Implements org. Doc from org. 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. | |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(String entityName) Implements org. Doc from org. 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. | |
| evictEntityData | back to summary |
|---|---|
| protected void evictEntityData(EntityPersister entityDescriptor) | |
| evictEntityData | back to summary |
|---|---|
| private void evictEntityData(NavigableRole navigableRole, EntityDataAccess cacheAccess) | |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData() Implements org. Doc from org. Evict all cached data from every cache region to which any entity type is assigned.
| |
| evictNaturalIdData | back to summary |
|---|---|
| public void evictNaturalIdData(Class<?> entityClass) Implements org. Doc from org. Evict all cached natural id mappings for the given entity type. | |
| evictNaturalIdData | back to summary |
|---|---|
| public void evictNaturalIdData(String entityName) Implements org. Doc from org. Evict all cached natural id mappings for the entity type with the given name. | |
| evictNaturalIdData | back to summary |
|---|---|
| private void evictNaturalIdData(EntityPersister rootEntityDescriptor) | |
| evictNaturalIdData | back to summary |
|---|---|
| public void evictNaturalIdData() Implements org. Doc from org. Evict all cached natural id mappings for every entity type.
| |
| evictNaturalIdData | back to summary |
|---|---|
| private void evictNaturalIdData(NavigableRole rootEntityRole, NaturalIdDataAccess cacheAccess) | |
| evictQueryRegion | back to summary |
|---|---|
| public void evictQueryRegion(String regionName) Implements org. Doc from org. Evict all cached query results from the region with the given name. | |
| evictQueryRegions | back to summary |
|---|---|
| public void evictQueryRegions() Implements org. Doc from org. Evict all cached query results from every region.
| |
| evictQueryResultRegion | back to summary |
|---|---|
| private void evictQueryResultRegion(QueryResultsCache cache) | |
| evictRegion | back to summary |
|---|---|
| public void evictRegion(String regionName) Implements org. Doc from org. Evict all cached data from the named cache region.
| |
| getCacheRegionNames | back to summary |
|---|---|
| public Set Implements org. Doc from org. The unqualified name of all regions. Intended for use with
| |
| getCollectionRegionAccess | back to summary |
|---|---|
| public CollectionDataAccess getCollectionRegionAccess(NavigableRole collectionRole) Implements org. Doc from org. Deprecated
Find the cache data access strategy for the given collection. Will
return
| |
| getDefaultQueryResultsCache | back to summary |
|---|---|
| public QueryResultsCache getDefaultQueryResultsCache() Implements org. Doc from org. Access to the "default" region used to store query results when caching
was requested but no region was explicitly named. Will return
| |
| getEnforcedCacheKeysFactory | back to summary |
|---|---|
| public CacheKeysFactory getEnforcedCacheKeysFactory() Implements org. Doc from org. The
| |
| getEntityRegionAccess | back to summary |
|---|---|
| public EntityDataAccess getEntityRegionAccess(NavigableRole rootEntityName) Implements org. Doc from org. Deprecated
Find the cache data access strategy for an entity. Will
return
| |
| getNaturalIdCacheRegionAccessStrategy | back to summary |
|---|---|
| public NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy(NavigableRole rootEntityName) Implements org. Doc from org. Deprecated
Find the cache data access strategy for the given entity's natural-id cache.
Will return
| |
| getQueryResultsCache | back to summary |
|---|---|
| public QueryResultsCache getQueryResultsCache(String regionName) throws HibernateException Implements org. Doc from org. Get query cache by
| |
| getQueryResultsCacheStrictly | back to summary |
|---|---|
| public QueryResultsCache getQueryResultsCacheStrictly(String regionName) Implements org. Doc from org. Get the named QueryResultRegionAccess but not creating one if it
does not already exist. This is intended for use by statistics.
Will return
| |
| getRegion | back to summary |
|---|---|
| public Region getRegion(String regionName) Implements org. Doc from org. Get a cache Region by name. If there is both a
| |
| getRegionFactory | back to summary |
|---|---|
| public RegionFactory getRegionFactory() Implements org. Doc from org. The underlying RegionFactory in use.
| |
| getSessionFactory | back to summary |
|---|---|
| public SessionFactoryImplementor getSessionFactory() Implements org. Doc from org. Deprecated as a consequence of Access to the SessionFactory for which a Region is being built.
| |
| getTimestampsCache | back to summary |
|---|---|
| public TimestampsCache getTimestampsCache() Implements org. Doc from org. Find the cache data access strategy for Hibernate's timestamps cache.
Will return
| |
| makeQueryResultsRegion | back to summary |
|---|---|
| protected QueryResultsRegion makeQueryResultsRegion(String regionName) | |
| makeQueryResultsRegionAccess | back to summary |
|---|---|
| protected QueryResultsCache makeQueryResultsRegionAccess(String regionName) | |
| prime | back to summary |
|---|---|
| public void prime(Set<DomainDataRegionConfig> cacheRegionConfigs) Implements org. Doc from org. An initialization phase allowing the caching provider to prime itself from the passed configs
| |
| unwrap | back to summary |
|---|---|
| public <T> T unwrap(Class<T> cls) Implements jakarta. Doc from jakarta. 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.
| |