| org.hibernate.cache |
|
This package defines APIs/SPIs and implementations for the Hibernate second-level cache.
The legacy (and now deprecated) approach to caching is defined by the {@link org.hibernate.cache.CacheProvider} and
{@link org.hibernate.cache.Cache} interfaces as well as the {@link org.hibernate.cache.CacheConcurrencyStrategy}
interface along with the various implementations of all these interfaces. In that scheme, a
{@link org.hibernate.cache.CacheProvider} defined how to configure and perform lifecycle operations
in regards to a particular underlying caching library; it also defined how to build {@link org.hibernate.cache.Cache}
instances which in turn defined how to access the "regions" of the underlying cache instance.
For entity and collection data cache regions, {@link org.hibernate.cache.CacheConcurrencyStrategy} wrapped
access to those cache regions to apply transactional/concurrent access semantics.
The improved approach is based on {@link org.hibernate.cache.RegionFactory}, the various
{@link org.hibernate.cache.Region} specializations and the two access strategies contracts
({@link org.hibernate.cache.access.EntityRegionAccessStrategy} and
{@link org.hibernate.cache.access.CollectionRegionAccessStrategy}). The general approach here is that
{@link org.hibernate.cache.RegionFactory} defined how to configure and perform lifecycle operations
in regards to a particular underlying caching library (or libraries).
{@link org.hibernate.cache.RegionFactory} also defines how to build specialized
{@link org.hibernate.cache.Region} instances based on the type of data we will be storing in that given
region. The fact that {@link org.hibernate.cache.RegionFactory} is asked to build specialized
regions (as opposed to just general access) is the first improvement over the legacy scheme. The
second improvement is the fact that the regions (well the ones like entity and collection regions
that are responsible for storing {@link org.hibernate.cache.TransactionalDataRegion transactional} data) are
asked to build their own access strategies (see {@link org.hibernate.cache.EntityRegion#buildAccessStrategy}
and {@link org.hibernate.cache.CollectionRegion#buildAccessStrategy}).
|
| Java Source File Name | Type | Comment |
| AbstractJndiBoundCacheProvider.java | Class | Support for CacheProvider implementations which are backed by caches bound
into JNDI namespace. |
| Cache.java | Interface | Implementors define a caching algorithm. |
| CacheConcurrencyStrategy.java | Interface | Implementors manage transactional access to cached data. |
| CacheDataDescription.java | Interface | Describes attributes regarding the type of data to be cached. |
| CacheException.java | Class | |
| CacheFactory.java | Class | |
| CacheKey.java | Class | Allows multiple entity classes / collection roles to be
stored in the same cache region. |
| CacheProvider.java | Interface | Support for pluggable caches. |
| CollectionRegion.java | Interface | Defines the contract for a cache region which will specifically be used to
store collection data. |
| EhCache.java | Class | EHCache plugin for Hibernate
EHCache uses a
net.sf.ehcache.store.MemoryStore and a
net.sf.ehcache.store.DiskStore .
The
net.sf.ehcache.store.DiskStore requires that both keys and values be
java.io.Serializable .
However the MemoryStore does not and in ehcache-1.2 nonSerializable Objects are permitted. |
| EhCacheProvider.java | Class | Cache Provider plugin for ehcache-1.2. |
| EhCacheTest.java | Class | |
| EntityRegion.java | Interface | Defines the contract for a cache region which will specifically be used to
store entity data. |
| FilterKey.java | Class | Allows cached queries to be keyed by enabled filters. |
| GeneralDataRegion.java | Interface | Contract for general-purpose cache regions. |
| HashtableCache.java | Class | |
| HashtableCacheProvider.java | Class | A simple in-memory Hashtable-based cache impl. |
| JndiBoundTreeCacheProvider.java | Class | Support for JBossCache (TreeCache), where the cache instance is available
via JNDI lookup. |
| NoCacheProvider.java | Class | Implementation of NoCacheProvider. |
| NoCachingEnabledException.java | Class | Implementation of NoCachingEnabledException. |
| NonstrictReadWriteCache.java | Class | Caches data that is sometimes updated without ever locking the cache.
If concurrent access to an item is possible, this concurrency strategy
makes no guarantee that the item returned from the cache is the latest
version available in the database. |
| OptimisticCache.java | Interface | A contract for transactional cache implementations which support
optimistic locking of items within the cache.
The optimisitic locking capabilities are only utilized for
the entity cache regions.
Unlike the methods on the
Cache interface, all the methods
here will only ever be called from access scenarios where versioned
data is actually a possiblity (i.e., entity data). |
| OptimisticCacheSource.java | Interface | Contract for sources of optimistically lockable data sent to the second level
cache. |
| OptimisticTreeCache.java | Class | Represents a particular region within the given JBossCache TreeCache
utilizing TreeCache's optimistic locking capabilities. |
| OptimisticTreeCacheProvider.java | Class | Support for a standalone JBossCache TreeCache instance utilizing TreeCache's
optimistic locking capabilities. |
| OptimisticTreeCacheTest.java | Class | |
| OSCache.java | Class | |
| OSCacheProvider.java | Class | Support for OpenSymphony OSCache. |
| PessimisticTreeCacheTest.java | Class | |
| QueryCache.java | Interface | Defines the contract for caches capable of storing query results. |
| QueryCacheFactory.java | Interface | Defines a factory for query cache instances. |
| QueryKey.java | Class | A key that identifies a particular query with bound parameter values. |
| QueryKeyTest.java | Class | Tests relating to
QueryKey instances. |
| QueryResultsRegion.java | Interface | Defines the contract for a cache region which will specifically be used to
store query results. |
| ReadOnlyCache.java | Class | Caches data that is never updated. |
| ReadWriteCache.java | Class | Caches data that is sometimes updated while maintaining the semantics of
"read committed" isolation level. |
| Region.java | Interface | Defines a contract for accessing a particular named region within the
underlying cache implementation. |
| RegionFactory.java | Interface | Contract for building second level cache regions.
Implementors should define a constructor in one of two forms:
Use the first when we need to read config properties prior to
RegionFactory.start being called. |
| SingletonEhCacheProvider.java | Class | Singleton cache Provider plugin for Hibernate 3.2 and ehcache-1.2. |
| StandardQueryCache.java | Class | The standard implementation of the Hibernate QueryCache interface. |
| StandardQueryCacheFactory.java | Class | Standard Hibernate implementation of the QueryCacheFactory interface. |
| SwarmCache.java | Class | |
| SwarmCacheProvider.java | Class | Support for SwarmCache replicated cache. |
| Timestamper.java | Class | Generates increasing identifiers (in a single VM only).
Not valid across multiple VMs. |
| TimestampsRegion.java | Interface | Defines the contract for a cache region which will specifically be used to
store entity "update timestamps". |
| TransactionalCache.java | Class | Support for fully transactional cache implementations like
JBoss TreeCache. |
| TransactionalDataRegion.java | Interface | Defines contract for regions which hold transactionally-managed data. |
| TransactionAwareCache.java | Interface | |
| TreeCache.java | Class | Represents a particular region within the given JBossCache TreeCache. |
| TreeCacheProvider.java | Class | Support for a standalone JBossCache (TreeCache) instance. |
| UpdateTimestampsCache.java | Class | Tracks the timestamps of the most recent updates to particular tables. |