public interface Cache
extends javax.persistence.Cache
Modifier and Type | Method and Description |
---|---|
boolean |
containsCollection(java.lang.String role,
java.io.Serializable ownerIdentifier)
Determine whether the cache contains data for the given collection.
|
boolean |
containsEntity(java.lang.Class entityClass,
java.io.Serializable identifier)
Determine whether the cache contains data for the given entity "instance".
|
boolean |
containsEntity(java.lang.String entityName,
java.io.Serializable identifier)
Determine whether the cache contains data for the given entity "instance".
|
boolean |
containsQuery(java.lang.String regionName)
Determine whether the cache contains data for the given query.
|
void |
evictAllRegions()
Evict all data from the cache.
|
void |
evictCollection(java.lang.String role,
java.io.Serializable ownerIdentifier)
Evicts the cache data for the given identified collection instance.
|
void |
evictCollectionRegion(java.lang.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(java.lang.Class entityClass,
java.io.Serializable identifier)
Evicts the entity data for a particular entity "instance".
|
void |
evictEntity(java.lang.String entityName,
java.io.Serializable identifier)
Evicts the entity data for a particular entity "instance".
|
void |
evictEntityRegion(java.lang.Class entityClass)
Evicts all entity data from the given region (i.e.
|
void |
evictEntityRegion(java.lang.String entityName)
Evicts all entity data from the given region (i.e.
|
void |
evictEntityRegions()
Evict data from all entity regions.
|
void |
evictNaturalIdRegion(java.lang.Class naturalIdClass)
Evicts all naturalId data from the given region (i.e.
|
void |
evictNaturalIdRegion(java.lang.String naturalIdName)
Evicts all naturalId data from the given region (i.e.
|
void |
evictNaturalIdRegions()
Evict data from all naturalId regions.
|
void |
evictQueryRegion(java.lang.String regionName)
Evicts all cached query results under the given name.
|
void |
evictQueryRegions()
Evict data from all query regions.
|
SessionFactory |
getSessionFactory()
Access to the SessionFactory this Cache is bound to.
|
SessionFactory getSessionFactory()
boolean containsEntity(java.lang.Class entityClass, java.io.Serializable identifier)
entityClass
- The entity class.identifier
- The entity identifierboolean containsEntity(java.lang.String entityName, java.io.Serializable identifier)
entityName
- The entity name.identifier
- The entity identifiervoid evictEntity(java.lang.Class entityClass, java.io.Serializable identifier)
entityClass
- The entity class.identifier
- The entity identifiervoid evictEntity(java.lang.String entityName, java.io.Serializable identifier)
entityName
- The entity name.identifier
- The entity identifiervoid evictEntityRegion(java.lang.Class entityClass)
entityClass
- The entity class.void evictEntityRegion(java.lang.String entityName)
entityName
- The entity name.void evictEntityRegions()
void evictNaturalIdRegion(java.lang.Class naturalIdClass)
naturalIdClass
- The naturalId class.void evictNaturalIdRegion(java.lang.String naturalIdName)
naturalIdName
- The naturalId name.void evictNaturalIdRegions()
boolean containsCollection(java.lang.String role, java.io.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 evictCollection(java.lang.String role, java.io.Serializable ownerIdentifier)
role
- The "collection role" (in form [owner-entity-name].[collection-property-name]).ownerIdentifier
- The identifier of the owning entityvoid evictCollectionRegion(java.lang.String role)
role
- The "collection role" (in form [owner-entity-name].[collection-property-name]).void evictCollectionRegions()
boolean containsQuery(java.lang.String regionName)
regionName
- The cache name given to the query.void evictDefaultQueryRegion()
void evictQueryRegion(java.lang.String regionName)
regionName
- The cache name associated to the queries being cached.void evictQueryRegions()
void evictAllRegions()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.