Top Inners Fields Constructors Methods
org.hibernate.cache.spi.support

public abstract Class AbstractDomainDataRegion

extends AbstractRegion
implements DomainDataRegion
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.spi.DomainDataRegion, org.hibernate.cache.spi.Region
Known Direct Subclasses
org.hibernate.cache.spi.support.DomainDataRegionTemplate
Imports
java.util.Collections, .HashMap, .List, .Map, org.hibernate.cache.CacheException, org.hibernate.cache.cfg.spi.CollectionDataCachingConfig, .DomainDataRegionBuildingContext, .DomainDataRegionConfig, .EntityDataCachingConfig, .NaturalIdDataCachingConfig, org.hibernate.cache.internal.DefaultCacheKeysFactory, org.hibernate.cache.spi.CacheKeysFactory, .DomainDataRegion, .RegionFactory, org.hibernate.cache.spi.access.CollectionDataAccess, .EntityDataAccess, .NaturalIdDataAccess, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.metamodel.model.domain.NavigableRole, org.jboss.logging.Logger

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
AbstractDomainDataRegion.Destructible

Optional interface caching implementors can implement in their CachedDomainDataAccess impls to automatically have them destroyed when this region is destroyed

Field Summary

Modifier and TypeField and Description
private Map<NavigableRole, CollectionDataAccess>
private final CacheKeysFactory
private Map<NavigableRole, EntityDataAccess>
private static final Logger
private Map<NavigableRole, NaturalIdDataAccess>
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Constructor Summary

AccessConstructor and Description
public
AbstractDomainDataRegion(DomainDataRegionConfig regionConfig, RegionFactory regionFactory, CacheKeysFactory defaultKeysFactory, DomainDataRegionBuildingContext buildingContext)

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Implements org.hibernate.cache.spi.Region.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.

public void
destroy()

Implements org.hibernate.cache.spi.Region.destroy.

The "end state" contract of the region's lifecycle.
protected abstract CollectionDataAccess
private Map<NavigableRole, CollectionDataAccess>
protected abstract EntityDataAccess
private Map<NavigableRole, EntityDataAccess>
protected abstract NaturalIdDataAccess
private Map<NavigableRole, NaturalIdDataAccess>
public CollectionDataAccess
getCollectionDataAccess(NavigableRole
The NavigableRole of the collection whose data we want to access
collectionRole
)

Implements org.hibernate.cache.spi.DomainDataRegion.getCollectionDataAccess.

Build a CollectionDataAccess instance representing access to destructured collection data stored in this cache region.
public CacheKeysFactory
public EntityDataAccess
getEntityDataAccess(NavigableRole
The root entity name for the hierarchy whose data we want to access
rootEntityRole
)

Implements org.hibernate.cache.spi.DomainDataRegion.getEntityDataAccess.

Build a EntityDataAccess instance representing access to destructured entity data stored in this cache region.
public NaturalIdDataAccess
getNaturalIdDataAccess(NavigableRole
The NavigableRole of the root entity whose natural id data we want to access
rootEntityRole
)

Implements org.hibernate.cache.spi.DomainDataRegion.getNaturalIdDataAccess.

Build a NaturalIdDataAccess instance representing access to natural id mappings stored in this cache region.
public SessionFactoryImplementor
getSessionFactory()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
protected void
protected void
protected void
Inherited from org.hibernate.cache.spi.support.AbstractRegion:
getNamegetRegionFactory

Field Detail

collectionDataAccessMapback to summary
private Map<NavigableRole, CollectionDataAccess> collectionDataAccessMap
effectiveKeysFactoryback to summary
private final CacheKeysFactory effectiveKeysFactory
entityDataAccessMapback to summary
private Map<NavigableRole, EntityDataAccess> entityDataAccessMap
logback to summary
private static final Logger log
naturalIdDataAccessMapback to summary
private Map<NavigableRole, NaturalIdDataAccess> naturalIdDataAccessMap
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Constructor Detail

AbstractDomainDataRegionback to summary
public AbstractDomainDataRegion(DomainDataRegionConfig regionConfig, RegionFactory regionFactory, CacheKeysFactory defaultKeysFactory, DomainDataRegionBuildingContext buildingContext)

Method Detail

clearback to summary
public void clear()

Implements org.hibernate.cache.spi.Region.clear.

Doc from org.hibernate.cache.spi.Region.clear.

Clear all data cached in the region

Annotations
@Override
completeInstantiationback to summary
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

destroyback to summary
public void destroy() throws CacheException

Implements org.hibernate.cache.spi.Region.destroy.

Doc from org.hibernate.cache.spi.Region.destroy.

The "end state" contract of the region's lifecycle. Called during org.hibernate.SessionFactory#close() to give the region a chance to cleanup.

Annotations
@Override
Exceptions
CacheException:
Indicates problem shutting down
generateCollectionAccessback to summary
protected abstract CollectionDataAccess generateCollectionAccess(CollectionDataCachingConfig cachingConfig)
generateCollectionDataAccessMapback to summary
private Map<NavigableRole, CollectionDataAccess> generateCollectionDataAccessMap(DomainDataRegionConfig regionConfig)
generateEntityAccessback to summary
protected abstract EntityDataAccess generateEntityAccess(EntityDataCachingConfig entityAccessConfig)
generateEntityDataAccessMapback to summary
private Map<NavigableRole, EntityDataAccess> generateEntityDataAccessMap(DomainDataRegionConfig regionConfig)
generateNaturalIdAccessback to summary
protected abstract NaturalIdDataAccess generateNaturalIdAccess(NaturalIdDataCachingConfig naturalIdAccessConfig)
generateNaturalIdDataAccessMapback to summary
private Map<NavigableRole, NaturalIdDataAccess> generateNaturalIdDataAccessMap(DomainDataRegionConfig regionConfig)
getCollectionDataAccessback to summary
public CollectionDataAccess getCollectionDataAccess(NavigableRole collectionRole)

Implements org.hibernate.cache.spi.DomainDataRegion.getCollectionDataAccess.

Doc from org.hibernate.cache.spi.DomainDataRegion.getCollectionDataAccess.

Build a CollectionDataAccess instance representing access to destructured collection data stored in this cache region.

Parameters
collectionRole:NavigableRole

The NavigableRole of the collection whose data we want to access

Annotations
@Override
getEffectiveKeysFactoryback to summary
public CacheKeysFactory getEffectiveKeysFactory()
getEntityDataAccessback to summary
public EntityDataAccess getEntityDataAccess(NavigableRole rootEntityRole)

Implements org.hibernate.cache.spi.DomainDataRegion.getEntityDataAccess.

Doc from org.hibernate.cache.spi.DomainDataRegion.getEntityDataAccess.

Build a EntityDataAccess instance representing access to destructured entity data stored in this cache region.

Parameters
rootEntityRole:NavigableRole

The root entity name for the hierarchy whose data we want to access

Annotations
@Override
getNaturalIdDataAccessback to summary
public NaturalIdDataAccess getNaturalIdDataAccess(NavigableRole rootEntityRole)

Implements org.hibernate.cache.spi.DomainDataRegion.getNaturalIdDataAccess.

Doc from org.hibernate.cache.spi.DomainDataRegion.getNaturalIdDataAccess.

Build a NaturalIdDataAccess instance representing access to natural id mappings stored in this cache region.

Parameters
rootEntityRole:NavigableRole

The NavigableRole of the root entity whose natural id data we want to access

Annotations
@Override
getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

releaseDataAccessback to summary
protected void releaseDataAccess(EntityDataAccess cacheAccess)
releaseDataAccessback to summary
protected void releaseDataAccess(NaturalIdDataAccess cacheAccess)
releaseDataAccessback to summary
protected void releaseDataAccess(CollectionDataAccess cacheAccess)
org.hibernate.cache.spi.support back to summary

public Interface AbstractDomainDataRegion.Destructible

Known Direct Implementers
org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess

Optional interface caching implementors can implement in their CachedDomainDataAccess impls to automatically have them destroyed when this region is destroyed

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

destroyback to summary
public void destroy()