Package org.hibernate.cache.spi
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 of Region
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
and
DomainDataStorageAccess
, 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 the hibernate-jcache
module. No custom
code is necessary, just an implementation of JCache, properly registered via
the JCache spec.
-
ClassDescriptionA factory for keys into the second-level cache.Defines a context object that a
RegionFactory
is asked to create (RegionFactory.createTransactionContext(org.hibernate.engine.spi.SharedSessionContractImplementor)
}) when a Hibernate Session is created.SpecializedRegion
whose data is accessed directly, without the need for key/item wrapping.A second-level cache region that holds cacheable domain data: the destructured state of entity instances and collections, and mappings from natural id to primary key.Optional contract for aRegion
defining support for extra statistic information.A key that identifies a particular query with bound parameter values.todo (6.0) : integrate work from original 6.0 branchResponsible for managing query result list caching in a specific query cache region.Defines the contract for a cache region that stores query results.Contract for a named cache "region".Contract for building second-level cache regions, including regions dedicated to storing: entity and collection instances, query result sets, and timestamps used to determine when a cached query result set is stale.Tracks invalidation of "query spaces" (tables) for the purpose of determining if a cached query result set is stale.Responsible for building theTimestampsCache
to use for managing query results with respect to staleness of the underlying tables (sometimes called "query spaces" or "table spaces").Defines the contract for a cache region that stores timestamps.