public interface Cache extends Cache
Modifier and Type | Method and Description |
---|---|
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.
|
default void |
evictAll()
Clear the cache.
|
default void |
evictAllRegions()
Evict data from all cache regions.
|
default void |
evictCollection(String role,
Serializable ownerIdentifier)
Deprecated.
Use
evictCollectionData(String, Serializable) instead |
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"
|
default void |
evictCollectionRegion(String role)
Deprecated.
Use
evictCollectionData(String) instead |
default void |
evictCollectionRegions()
Deprecated.
Use
evictCollectionData() instead |
void |
evictDefaultQueryRegion()
Evicts all cached query results from the default region.
|
default void |
evictEntity(Class entityClass,
Serializable identifier)
Deprecated.
Use
evictEntityData(Class, Serializable) instead |
default void |
evictEntity(String entityName,
Serializable identifier)
Deprecated.
Use
evictEntityData(String, Serializable) instead |
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".
|
default void |
evictEntityRegion(Class entityClass)
Deprecated.
Use
evictEntityData(Class) instead |
default void |
evictEntityRegion(String entityName)
Deprecated.
Use
evictEntityData(String) instead |
default void |
evictEntityRegions()
Deprecated.
Use
evictEntityData() instead |
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
|
default void |
evictNaturalIdRegion(Class entityClass)
Deprecated.
Use
evictNaturalIdData(Class) instead |
default void |
evictNaturalIdRegion(String entityName)
Deprecated.
Use
evictNaturalIdData(String) instead |
default void |
evictNaturalIdRegions()
Deprecated.
Use
evictNaturalIdData() instead |
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
|
SessionFactory |
getSessionFactory()
Access to the SessionFactory this Cache is bound to.
|
SessionFactory getSessionFactory()
boolean containsEntity(Class entityClass, Serializable identifier)
entityClass
- The entity class.identifier
- The entity identifierboolean containsEntity(String entityName, Serializable identifier)
entityName
- The entity name.identifier
- The entity identifiervoid evictEntityData(Class entityClass, Serializable identifier)
entityClass
- The entity class.identifier
- The entity identifiervoid evictEntityData(String entityName, Serializable identifier)
entityName
- The entity name.identifier
- The entity identifiervoid evictEntityData(Class entityClass)
entityClass
- The entity class.void evictEntityData(String entityName)
entityName
- The entity name.void evictEntityData()
void evictNaturalIdData(Class entityClass)
entityClass
- The entity class.void evictNaturalIdData(String entityName)
entityName
- The entity name.void evictNaturalIdData()
boolean containsCollection(String role, Serializable ownerIdentifier)
role
- 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 entityvoid evictCollectionData(String role, Serializable ownerIdentifier)
role
- The "collection role" (in form [owner-entity-name].[collection-property-name]).ownerIdentifier
- The identifier of the owning entityvoid evictCollectionData(String role)
role
- The "collection role" (in form [owner-entity-name].[collection-property-name]).void evictCollectionData()
boolean containsQuery(String regionName)
regionName
- The cache name given to the query.void evictDefaultQueryRegion()
void evictQueryRegion(String regionName)
regionName
- The cache name associated to the queries being cached.void evictQueryRegions()
void evictRegion(String regionName)
default void evictAllRegions()
@Deprecated default void evictEntity(Class entityClass, Serializable identifier)
evictEntityData(Class, Serializable)
insteadentityClass
- The entity class.identifier
- The entity identifier@Deprecated default void evictEntity(String entityName, Serializable identifier)
evictEntityData(String, Serializable)
insteadentityName
- The entity name.identifier
- The entity identifier@Deprecated default void evictEntityRegion(Class entityClass)
evictEntityData(Class)
insteadentityClass
- The entity class.@Deprecated default void evictEntityRegion(String entityName)
evictEntityData(String)
insteadentityName
- The entity name.@Deprecated default void evictEntityRegions()
evictEntityData()
instead@Deprecated default void evictNaturalIdRegion(Class entityClass)
evictNaturalIdData(Class)
insteadentityClass
- The entity class.@Deprecated default void evictNaturalIdRegion(String entityName)
evictNaturalIdData(String)
insteadentityName
- The entity name.@Deprecated default void evictNaturalIdRegions()
evictNaturalIdData()
instead@Deprecated default void evictCollection(String role, Serializable ownerIdentifier)
evictCollectionData(String, Serializable)
insteadrole
- The "collection role" (in form [owner-entity-name].[collection-property-name]).ownerIdentifier
- The identifier of the owning entity@Deprecated default void evictCollectionRegion(String role)
evictCollectionData(String)
insteadrole
- The "collection role" (in form [owner-entity-name].[collection-property-name]).@Deprecated default void evictCollectionRegions()
evictCollectionData()
insteadCopyright © 2019 JBoss by Red Hat. All rights reserved.