public abstract class AbstractDomainDataRegion extends AbstractRegion implements DomainDataRegion
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractDomainDataRegion.Destructible
Optional interface caching implementors can implement in their
CachedDomainDataAccess impls to automatically have them destroyed
when this region is destroyed
|
Constructor and Description |
---|
AbstractDomainDataRegion(DomainDataRegionConfig regionConfig,
RegionFactory regionFactory,
CacheKeysFactory defaultKeysFactory,
DomainDataRegionBuildingContext buildingContext) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all data cached in the region
|
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.
|
void |
destroy()
The "end state" contract of the region's lifecycle.
|
protected abstract CollectionDataAccess |
generateCollectionAccess(CollectionDataCachingConfig cachingConfig) |
protected abstract EntityDataAccess |
generateEntityAccess(EntityDataCachingConfig entityAccessConfig) |
protected abstract NaturalIdDataAccess |
generateNaturalIdAccess(NaturalIdDataCachingConfig naturalIdAccessConfig) |
CollectionDataAccess |
getCollectionDataAccess(NavigableRole collectionRole)
Build a CollectionRegionAccess instance representing access to collection
data stored in this cache region using the given AccessType.
|
CacheKeysFactory |
getEffectiveKeysFactory() |
EntityDataAccess |
getEntityDataAccess(NavigableRole rootEntityRole)
Build a EntityRegionAccess instance representing access to entity data
stored in this cache region using the given AccessType.
|
NaturalIdDataAccess |
getNaturalIdDataAccess(NavigableRole rootEntityRole)
Build a NaturalIdRegionAccess instance representing access to natural-id
data stored in this cache region using the given AccessType.
|
SessionFactoryImplementor |
getSessionFactory() |
protected void |
releaseDataAccess(CollectionDataAccess cacheAccess) |
protected void |
releaseDataAccess(EntityDataAccess cacheAccess) |
protected void |
releaseDataAccess(NaturalIdDataAccess cacheAccess) |
getName, getRegionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getRegionFactory
public AbstractDomainDataRegion(DomainDataRegionConfig regionConfig, RegionFactory regionFactory, CacheKeysFactory defaultKeysFactory, DomainDataRegionBuildingContext buildingContext)
protected void completeInstantiation(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext)
public SessionFactoryImplementor getSessionFactory()
public CacheKeysFactory getEffectiveKeysFactory()
public EntityDataAccess getEntityDataAccess(NavigableRole rootEntityRole)
DomainDataRegion
getEntityDataAccess
in interface DomainDataRegion
rootEntityRole
- The root entity name for the hierarchy whose data
we want to accesspublic NaturalIdDataAccess getNaturalIdDataAccess(NavigableRole rootEntityRole)
DomainDataRegion
getNaturalIdDataAccess
in interface DomainDataRegion
rootEntityRole
- The NavigableRole of the root entity whose
natural-id data we want to accesspublic CollectionDataAccess getCollectionDataAccess(NavigableRole collectionRole)
DomainDataRegion
getCollectionDataAccess
in interface DomainDataRegion
collectionRole
- The NavigableRole of the collection whose data
we want to accessprotected abstract EntityDataAccess generateEntityAccess(EntityDataCachingConfig entityAccessConfig)
protected abstract CollectionDataAccess generateCollectionAccess(CollectionDataCachingConfig cachingConfig)
protected abstract NaturalIdDataAccess generateNaturalIdAccess(NaturalIdDataCachingConfig naturalIdAccessConfig)
public void clear()
Region
protected void releaseDataAccess(EntityDataAccess cacheAccess)
protected void releaseDataAccess(NaturalIdDataAccess cacheAccess)
protected void releaseDataAccess(CollectionDataAccess cacheAccess)
public void destroy() throws CacheException
Region
SessionFactory.close()
to give
the region a chance to cleanup.destroy
in interface Region
CacheException
- Indicates problem shutting downCopyright © 2019 JBoss by Red Hat. All rights reserved.