Package org.hibernate.cache.spi.support
Class DomainDataRegionTemplate
- java.lang.Object
-
- org.hibernate.cache.spi.support.AbstractRegion
-
- org.hibernate.cache.spi.support.AbstractDomainDataRegion
-
- org.hibernate.cache.spi.support.DomainDataRegionTemplate
-
- All Implemented Interfaces:
DomainDataRegion
,Region
- Direct Known Subclasses:
DomainDataRegionImpl
public class DomainDataRegionTemplate extends AbstractDomainDataRegion
Abstract implementation ofDomainDataRegion
based on implementations just needing to provide aDomainDataStorageAccess
reference for basic caching support - DomainDataStorageAccess acts as a simple wrapper around some generalized cache actions such as put or get. Most implementations (our own JCache-based one included) can likely be as simple as: * Custom DomainDataStorageAccess implementation, bridging calls back to the specific cache provider's APIs * Custom DomainDataRegionTemplate implementation that creates its custom DomainDataStorageAccess reference * Custom RegionFactory implementation that creates its custom DomainDataRegionTemplate todo (5.3) : move this javadoc into DomainDataRegion and/or package javadoc
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.cache.spi.support.AbstractDomainDataRegion
AbstractDomainDataRegion.Destructible
-
-
Constructor Summary
Constructors Constructor Description DomainDataRegionTemplate(DomainDataRegionConfig regionConfig, RegionFactory regionFactory, DomainDataStorageAccess storageAccess, CacheKeysFactory defaultKeysFactory, DomainDataRegionBuildingContext buildingContext)
-
Method Summary
-
Methods inherited from class org.hibernate.cache.spi.support.AbstractDomainDataRegion
clear, completeInstantiation, destroy, getCollectionDataAccess, getEffectiveKeysFactory, getEntityDataAccess, getNaturalIdDataAccess, getSessionFactory, releaseDataAccess, releaseDataAccess, releaseDataAccess
-
Methods inherited from class org.hibernate.cache.spi.support.AbstractRegion
getName, getRegionFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.cache.spi.Region
getName, getRegionFactory
-
-
-
-
Constructor Detail
-
DomainDataRegionTemplate
public DomainDataRegionTemplate(DomainDataRegionConfig regionConfig, RegionFactory regionFactory, DomainDataStorageAccess storageAccess, CacheKeysFactory defaultKeysFactory, DomainDataRegionBuildingContext buildingContext)
-
-
Method Detail
-
getCacheStorageAccess
public DomainDataStorageAccess getCacheStorageAccess()
Public for testing purposes
-
generateEntityAccess
public EntityDataAccess generateEntityAccess(EntityDataCachingConfig entityAccessConfig)
- Specified by:
generateEntityAccess
in classAbstractDomainDataRegion
-
generateReadOnlyEntityAccess
protected EntityDataAccess generateReadOnlyEntityAccess(EntityDataCachingConfig accessConfig)
-
generateReadWriteEntityAccess
protected EntityDataAccess generateReadWriteEntityAccess(EntityDataCachingConfig accessConfig)
-
generateNonStrictReadWriteEntityAccess
protected EntityDataAccess generateNonStrictReadWriteEntityAccess(EntityDataCachingConfig accessConfig)
-
generateTransactionalEntityDataAccess
protected EntityDataAccess generateTransactionalEntityDataAccess(EntityDataCachingConfig entityAccessConfig)
-
generateNaturalIdAccess
public NaturalIdDataAccess generateNaturalIdAccess(NaturalIdDataCachingConfig accessConfig)
- Specified by:
generateNaturalIdAccess
in classAbstractDomainDataRegion
-
generateReadOnlyNaturalIdAccess
protected NaturalIdDataAccess generateReadOnlyNaturalIdAccess(NaturalIdDataCachingConfig accessConfig)
-
generateReadWriteNaturalIdAccess
protected NaturalIdDataAccess generateReadWriteNaturalIdAccess(NaturalIdDataCachingConfig accessConfig)
-
generateNonStrictReadWriteNaturalIdAccess
protected NaturalIdDataAccess generateNonStrictReadWriteNaturalIdAccess(NaturalIdDataCachingConfig accessConfig)
-
generateTransactionalNaturalIdDataAccess
protected NaturalIdDataAccess generateTransactionalNaturalIdDataAccess(NaturalIdDataCachingConfig accessConfig)
-
generateCollectionAccess
public CollectionDataAccess generateCollectionAccess(CollectionDataCachingConfig accessConfig)
- Specified by:
generateCollectionAccess
in classAbstractDomainDataRegion
-
generateTransactionalCollectionDataAccess
protected CollectionDataAccess generateTransactionalCollectionDataAccess(CollectionDataCachingConfig accessConfig)
-
-