Package org.hibernate.cache.spi
Defines the integration aspect of Hibernate's second-level caching, allowing a "caching backend" to be plugged in as a cache provider.
RegionFactory is the main integration contract that defines how Hibernate interacts with the provider. Its main contract is the generation ofRegion references with some requested intent (what will be stored there).
A provider will integrate with Hibernate by implementing either:
- the contracts in
org.hibernate.cache.spi, - the contracts in
org.hibernate.cache.spi.support, or - a mix of the above.
StorageAccess andDomainDataStorageAccess, which are basic read/write abstractions of the underlying cache. That is to say,org.hibernate.cache.spi.support comes with a nearly complete implementation, except for these "storage access" objects. Alternatively, providers may integrate with Hibernate via Hibernate's support for JCache, which is defined by thehibernate-jcache module. No custom code is necessary, just an implementation of JCache, properly registered via the JCache spec.
Interface Summary Interface Description CacheImplementor CacheKeysFactory A factory for keys into the second-level cache.CacheTransactionSynchronization Defines a context object that aRegionFactoryis asked to create (RegionFactory.createTransactionContext(org.hibernate.engine.spi.SharedSessionContractImplementor)}) when a Hibernate Session is created.DirectAccessRegion SpecializedRegionwhose data is accessed directly, without the need for key/item wrapping.DomainDataRegion Asecond-level cache region that holds cacheable domain data: the destructured state of entity instances and collections, and mappings from natural id to primary key.ExtendedStatisticsSupport Optional contract for aRegiondefining support for extra statistic information.QueryKey.ParameterBindingsMemento todo (6.0) : integrate work from original 6.0 branchQueryResultsCache Responsible for managing query result list caching in a specificquery cache region.QueryResultsRegion Defines the contract for a cache region that stores query results.Region Contract for a named cache "region".RegionFactory Contract for building second-level cache regions, including regions dedicated to storing:entity and collection instances,query result sets, andtimestamps used to determine when a cached query result set is stale.SecondLevelCacheLogger TimestampsCache Tracks invalidation of "query spaces" (tables) for the purpose of determining if a cached query result set is stale.TimestampsCacheFactory Responsible for building theTimestampsCacheto use for managing query results with respect to staleness of the underlying tables (sometimes called "query spaces" or "table spaces").TimestampsRegion Defines the contract for a cache region that stores timestamps.Class Summary Class Description AbstractCacheTransactionSynchronization AbstractRegionFactory FilterKey Deprecated. this class is no longer usedQueryKey A key that identifies a particular query with bound parameter values.QuerySpacesHelper Deprecated. This helper class is no longer usedStandardCacheTransactionSynchronization