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 AbstractRegion
getName, getRegionFactoryMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Region
getName, getRegionFactory
-
Constructor Details
-
AbstractDomainDataRegion
public AbstractDomainDataRegion(@Nonnull DomainDataRegionConfig regionConfig, @Nonnull RegionFactory regionFactory, @Nullable CacheKeysFactory defaultKeysFactory, @Nonnull DomainDataRegionBuildingContext buildingContext)
-
-
Method Details
-
completeInstantiation
protected void completeInstantiation(@Nonnull DomainDataRegionConfig regionConfig, @Nonnull 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
@Nonnull protected abstract EntityDataAccess generateEntityAccess(@Nonnull EntityDataCachingConfig entityAccessConfig) -
generateCollectionAccess
@Nonnull protected abstract CollectionDataAccess generateCollectionAccess(@Nonnull CollectionDataCachingConfig cachingConfig) -
generateNaturalIdAccess
@Nonnull protected abstract NaturalIdDataAccess generateNaturalIdAccess(@Nonnull NaturalIdDataCachingConfig naturalIdAccessConfig) -
clear
-
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
-