Package org.hibernate.cache.spi.support
Class AbstractDomainDataRegion
java.lang.Object
org.hibernate.cache.spi.support.AbstractRegion
org.hibernate.cache.spi.support.AbstractDomainDataRegion
- All Implemented Interfaces:
DomainDataRegion,Region
- Direct Known Subclasses:
DomainDataRegionTemplate
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceOptional interface caching implementors can implement in their CachedDomainDataAccess impls to automatically have them destroyed when this region is destroyed -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDomainDataRegion(DomainDataRegionConfig regionConfig, RegionFactory regionFactory, CacheKeysFactory defaultKeysFactory, DomainDataRegionBuildingContext buildingContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all data cached in the regionprotected voidcompleteInstantiation(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext) Should be called at the end of the subtype's constructor, or at least after the `#super(...)` (aka, this type's constructor) call.voiddestroy()The "end state" contract of the region's lifecycle.protected abstract CollectionDataAccessgenerateCollectionAccess(CollectionDataCachingConfig cachingConfig) protected abstract EntityDataAccessgenerateEntityAccess(EntityDataCachingConfig entityAccessConfig) protected abstract NaturalIdDataAccessgenerateNaturalIdAccess(NaturalIdDataCachingConfig naturalIdAccessConfig) getCollectionDataAccess(NavigableRole collectionRole) Build aCollectionDataAccessinstance representing access to destructured collection data stored in this cache region.getEntityDataAccess(NavigableRole rootEntityRole) Build aEntityDataAccessinstance representing access to destructured entity data stored in this cache region.getNaturalIdDataAccess(NavigableRole rootEntityRole) Build aNaturalIdDataAccessinstance representing access to natural id mappings stored in this cache region.protected voidreleaseDataAccess(CollectionDataAccess cacheAccess) protected voidreleaseDataAccess(EntityDataAccess cacheAccess) protected voidreleaseDataAccess(NaturalIdDataAccess cacheAccess) Methods inherited from class org.hibernate.cache.spi.support.AbstractRegion
getName, getRegionFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.cache.spi.Region
getName, getRegionFactory
-
Constructor Details
-
AbstractDomainDataRegion
public AbstractDomainDataRegion(DomainDataRegionConfig regionConfig, RegionFactory regionFactory, CacheKeysFactory defaultKeysFactory, DomainDataRegionBuildingContext buildingContext)
-
-
Method Details
-
completeInstantiation
protected void completeInstantiation(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext) Should be called at the end of the subtype's constructor, or at least after the `#super(...)` (aka, this type's constructor) call. It's a timing issue - we need access to the DomainDataStorageAccess in DomainDataRegionTemplate but in methods initiated (atm) from AbstractDomainDataRegion's constructor -
getSessionFactory
-
getEffectiveKeysFactory
-
generateEntityAccess
protected abstract EntityDataAccess generateEntityAccess(EntityDataCachingConfig entityAccessConfig) -
generateCollectionAccess
protected abstract CollectionDataAccess generateCollectionAccess(CollectionDataCachingConfig cachingConfig) -
generateNaturalIdAccess
protected abstract NaturalIdDataAccess generateNaturalIdAccess(NaturalIdDataCachingConfig naturalIdAccessConfig) -
clear
public void clear()Description copied from interface:RegionClear all data cached in the region -
releaseDataAccess
-
releaseDataAccess
-
releaseDataAccess
-
destroy
Description copied from interface:RegionThe "end state" contract of the region's lifecycle. Called duringSessionFactory.close()to give the region a chance to cleanup.- Specified by:
destroyin interfaceRegion- Throws:
CacheException- Indicates problem shutting down
-