CAUTION: None of these methods respect any isolation or transactional semantics associated with the underlying caches. Specifically, evictions perform an immediate "hard" removal outside any transactions and/or locking scheme(s).
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: True if the underlying cache contains corresponding data; false otherwise.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)Determine whether the cache contains data for the given collection. |
| public boolean | Returns: True if the underlying cache contains corresponding data; false otherwise.The entity class. entityClass, Serializable The entity identifier identifier)Determine whether the cache contains data for the given entity "instance". |
| public boolean | Returns: True if the underlying cache contains corresponding data; false otherwise.The entity name. entityName, Serializable The entity identifier identifier)Determine whether the cache contains data for the given entity "instance". |
| public boolean | Returns: True if the underlying cache contains corresponding data; false otherwise.The cache name given to the query. regionName)Determine whether the cache contains data for the given query. |
| public default void | |
| public default void | |
| public default void | evictCollection(String
The "collection role" (in form [owner-entity-name].[collection-property-name]). role, Serializable The identifier of the owning entity ownerIdentifier)
Deprecated
Use
Evicts the cache data for the given identified collection instance.
Cache#evictCollectionData(String, Serializable) instead
|
| public void | evictCollectionData(String
The "collection role" (in form [owner-entity-name].[collection-property-name]). role, Serializable The identifier of the owning entity ownerIdentifier)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)Evicts cached data for the given collection role |
| public void | |
| public default void | evictCollectionRegion(String
The "collection role" (in form [owner-entity-name].[collection-property-name]). role)
Deprecated
Use
Evicts all entity data from the given region (i.e. evicts cached data
for all of the specified collection role).
Cache#evictCollectionData(String) instead
|
| public default void | evictCollectionRegions()
Deprecated
Use
Evict data from all collection regions.
Cache#evictCollectionData() instead
|
| public void | |
| public default void | evictEntity(Class<T>
The entity class. entityClass, Serializable The entity identifier identifier)
Deprecated
Use
Evicts the entity data for a particular entity "instance".
Cache#evictEntityData(Class, Serializable) instead
|
| public default void | evictEntity(String
The entity name. entityName, Serializable The entity identifier identifier)
Deprecated
Use
Evicts the entity data for a particular entity "instance".
Cache#evictEntityData(String, Serializable) instead
|
| public void | evictEntityData(Class<T>
The entity class. entityClass, Serializable The entity identifier identifier)Evicts the entity data for a particular entity "instance". |
| public void | evictEntityData(String
The entity name. entityName, Serializable The entity identifier identifier)Evicts the entity data for a particular entity "instance". |
| public void | evictEntityData(Class<T>
The entity class. entityClass)Evicts all entity data from the given region (i.e. for all entities of type). |
| public void | evictEntityData(String
The entity name. entityName)Evicts all entity data from the given region (i.e. for all entities of type). |
| public void | |
| public default void | evictEntityRegion(Class<T>
The entity class. entityClass)
Deprecated
Use
Evicts all entity data from the given region (i.e. for all entities of
type).
Cache#evictEntityData(Class) instead
|
| public default void | evictEntityRegion(String
The entity name. entityName)
Deprecated
Use
Evicts all entity data from the given region (i.e. for all entities of
type).
Cache#evictEntityData(String) instead
|
| public default void | evictEntityRegions()
Deprecated
Use
Evict data from all entity regions.
Cache#evictEntityData() instead
|
| public void | evictNaturalIdData(Class<T>
The entity class. entityClass)Evict cached data for the given entity's natural-id |
| public void | evictNaturalIdData(String
The entity name. entityName)Evict cached data for the given entity's natural-id |
| public void | |
| public default void | evictNaturalIdRegion(Class<T>
The entity class. entityClass)
Deprecated
Use
Evicts all naturalId data from the given region (i.e. for all entities of
type).
Cache#evictNaturalIdData(Class) instead
|
| public default void | evictNaturalIdRegion(String
The entity name. entityName)
Deprecated
Use
Evicts all naturalId data from the given region (i.e. for all entities of
type).
Cache#evictNaturalIdData(String) instead
|
| public default void | evictNaturalIdRegions()
Deprecated
Use
Evict data from all naturalId regions.
Cache#evictNaturalIdData() instead
|
| public void | evictQueryRegion(String
The cache name associated to the queries being cached. regionName)Evicts all cached query results under the given name. |
| public void | |
| public void | |
| public SessionFactory | Returns: The SessionFactory
Deprecated
as a consequence of
Access to the SessionFactory this Cache is bound to.
SessionFactory being deprecated.
|
| containsCollection | back to summary |
|---|---|
| public boolean containsCollection(String role, Serializable ownerIdentifier) 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.
| |
| containsEntity | back to summary |
|---|---|
| public boolean containsEntity(Class<T> entityClass, Serializable identifier) 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.
| |
| containsEntity | back to summary |
|---|---|
| public boolean containsEntity(String entityName, Serializable identifier) 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.
| |
| containsQuery | back to summary |
|---|---|
| public boolean containsQuery(String regionName) 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.
| |
| evictAll | back to summary |
|---|---|
| public default void evictAll() Implements javax. Doc from javax. Clear the cache. API Note Hibernate impl - we only evict entity data here in keeping
with the JPA intent (JPA only defines caching for entity data). For
evicting all cache regions (collections, natural-ids and query results),
use
| |
| evictAllRegions | back to summary |
|---|---|
| public default void evictAllRegions() Evict data from all cache regions. | |
| evictCollection | back to summary |
|---|---|
| public default void evictCollection(String role, Serializable ownerIdentifier)
Deprecated Use Evicts the cache data for the given identified collection instance.
| |
| evictCollectionData | back to summary |
|---|---|
| public void evictCollectionData(String role, Serializable ownerIdentifier) Evicts the cache data for the given identified collection "instance"
| |
| evictCollectionData | back to summary |
|---|---|
| public void evictCollectionData(String role) Evicts cached data for the given collection role
| |
| evictCollectionData | back to summary |
|---|---|
| public void evictCollectionData() Evict cache data for all collections
| |
| evictCollectionRegion | back to summary |
|---|---|
| public default void evictCollectionRegion(String role)
Deprecated Use Evicts all entity data from the given region (i.e. evicts cached data for all of the specified collection role).
| |
| evictCollectionRegions | back to summary |
|---|---|
| public default void evictCollectionRegions()
Deprecated Use Evict data from all collection regions.
| |
| evictDefaultQueryRegion | back to summary |
|---|---|
| public void evictDefaultQueryRegion() Evicts all cached query results from the default region. | |
| evictEntity | back to summary |
|---|---|
| public default void evictEntity(Class<T> entityClass, Serializable identifier)
Deprecated Use Evicts the entity data for a particular entity "instance".
| |
| evictEntity | back to summary |
|---|---|
| public default void evictEntity(String entityName, Serializable identifier)
Deprecated Use Evicts the entity data for a particular entity "instance".
| |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(Class<T> entityClass, Serializable identifier) Evicts the entity data for a particular entity "instance".
| |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(String entityName, Serializable identifier) Evicts the entity data for a particular entity "instance".
| |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(Class<T> entityClass) Evicts all entity data from the given region (i.e. for all entities of type).
| |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData(String entityName) Evicts all entity data from the given region (i.e. for all entities of type).
| |
| evictEntityData | back to summary |
|---|---|
| public void evictEntityData() Evict data from all entity regions.
| |
| evictEntityRegion | back to summary |
|---|---|
| public default void evictEntityRegion(Class<T> entityClass)
Deprecated Use Evicts all entity data from the given region (i.e. for all entities of type).
| |
| evictEntityRegion | back to summary |
|---|---|
| public default void evictEntityRegion(String entityName)
Deprecated Use Evicts all entity data from the given region (i.e. for all entities of type).
| |
| evictEntityRegions | back to summary |
|---|---|
| public default void evictEntityRegions()
Deprecated Use Evict data from all entity regions.
| |
| evictNaturalIdData | back to summary |
|---|---|
| public void evictNaturalIdData(Class<T> entityClass) Evict cached data for the given entity's natural-id
| |
| evictNaturalIdData | back to summary |
|---|---|
| public void evictNaturalIdData(String entityName) Evict cached data for the given entity's natural-id
| |
| evictNaturalIdData | back to summary |
|---|---|
| public void evictNaturalIdData() Evict cached data for all natural-ids (for all entities)
| |
| evictNaturalIdRegion | back to summary |
|---|---|
| public default void evictNaturalIdRegion(Class<T> entityClass)
Deprecated Use Evicts all naturalId data from the given region (i.e. for all entities of type).
| |
| evictNaturalIdRegion | back to summary |
|---|---|
| public default void evictNaturalIdRegion(String entityName)
Deprecated Use Evicts all naturalId data from the given region (i.e. for all entities of type).
| |
| evictNaturalIdRegions | back to summary |
|---|---|
| public default void evictNaturalIdRegions()
Deprecated Use Evict data from all naturalId regions.
| |
| evictQueryRegion | back to summary |
|---|---|
| public void evictQueryRegion(String regionName) Evicts all cached query results under the given name.
| |
| evictQueryRegions | back to summary |
|---|---|
| public void evictQueryRegions() Evict data from all query regions. | |
| evictRegion | back to summary |
|---|---|
| public void evictRegion(String regionName) Evict all data from the named cache region
| |
| getSessionFactory | back to summary |
|---|---|
| public SessionFactory getSessionFactory()
Deprecated as a consequence of Access to the SessionFactory this Cache is bound to.
| |