Package org.hibernate.cache.spi.support
Package intended for simplifying the worked needed to implement a caching provider.
Centers around the concept of
StorageAccess
and DomainDataStorageAccess
to implement
most of the "grunt work" associated with the implementation.
A typical integration would just implement:
- a custom
StorageAccess
/DomainDataStorageAccess
, along with - a custom
RegionFactoryTemplate
, in particular:RegionFactoryTemplate.createDomainDataStorageAccess(org.hibernate.cache.cfg.spi.DomainDataRegionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext)
RegionFactoryTemplate.createQueryResultsRegionStorageAccess(java.lang.String, org.hibernate.engine.spi.SessionFactoryImplementor)
RegionFactoryTemplate.createTimestampsRegionStorageAccess(java.lang.String, org.hibernate.engine.spi.SessionFactoryImplementor)
The preferred approach to "provide an integration" is through a custom
StrategyRegistrationProvider
.
Both hibernate-testing
(org.hibernate.testing.cache.CachingRegionFactory
)
and hibernate-jcache
(org.hibernate.cache.jcache.internal.JCacheRegionFactory
)
provide examples of using this support package to implement a caching
provider.
-
Interface Summary Interface Description AbstractDomainDataRegion.Destructible Optional interface caching implementors can implement in their CachedDomainDataAccess impls to automatically have them destroyed when this region is destroyedAbstractReadWriteAccess.Lockable Interface type implemented by all wrapper objects in the cache.DomainDataStorageAccess Specialization ofStorageAccess
for domain data regionsStorageAccess A general read/write abstraction over the specific "cache" object from the caching provider. -
Enum Summary Enum Description AccessedDataClassification