Package org.hibernate.cache.spi
Interface DomainDataRegion
-
- All Superinterfaces:
Region
- All Known Implementing Classes:
AbstractDomainDataRegion,DomainDataRegionImpl,DomainDataRegionTemplate,JCacheDomainDataRegionImpl
public interface DomainDataRegion extends Region
A second-level cache region that holds cacheable domain data:- the destructured state of entity instances and collections, and
- mappings from natural id to primary key.
This type of data has:
- key and value wrapping that should to be applied, and
- defined policies for managing concurrent data access, possibly including some form of locking.
These behaviors are defined by an instance of
EntityDataAccess,CollectionDataAccess, orNaturalIdDataAccess).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CollectionDataAccessgetCollectionDataAccess(NavigableRole collectionRole)Build aCollectionDataAccessinstance representing access to destructured collection data stored in this cache region.EntityDataAccessgetEntityDataAccess(NavigableRole rootEntityRole)Build aEntityDataAccessinstance representing access to destructured entity data stored in this cache region.NaturalIdDataAccessgetNaturalIdDataAccess(NavigableRole rootEntityRole)Build aNaturalIdDataAccessinstance representing access to natural id mappings stored in this cache region.-
Methods inherited from interface org.hibernate.cache.spi.Region
clear, destroy, getName, getRegionFactory
-
-
-
-
Method Detail
-
getEntityDataAccess
EntityDataAccess getEntityDataAccess(NavigableRole rootEntityRole)
Build aEntityDataAccessinstance representing access to destructured entity data stored in this cache region.- Parameters:
rootEntityRole- The root entity name for the hierarchy whose data we want to access- Throws:
CacheException- If the provider cannot provide the requested access- API Note:
- Calling this method is illegal if the given entity is not cacheable
-
getNaturalIdDataAccess
NaturalIdDataAccess getNaturalIdDataAccess(NavigableRole rootEntityRole)
Build aNaturalIdDataAccessinstance representing access to natural id mappings stored in this cache region.- Parameters:
rootEntityRole- The NavigableRole of the root entity whose natural id data we want to access- Throws:
CacheException- If the provider cannot provide the requested access- API Note:
- Calling this method is illegal if the given natural id is not cacheable
-
getCollectionDataAccess
CollectionDataAccess getCollectionDataAccess(NavigableRole collectionRole)
Build aCollectionDataAccessinstance representing access to destructured collection data stored in this cache region.- Parameters:
collectionRole- The NavigableRole of the collection whose data we want to access- Throws:
CacheException- If the provider cannot provide the requested access- API Note:
- Calling this method is illegal if the given collection is not cacheable
-
-