slight cleanup to the docs for o.h.cache.spi.support

This commit is contained in:
Gavin 2022-12-30 13:39:18 +01:00
parent 61f71030ff
commit 9ea6f162fd
5 changed files with 28 additions and 31 deletions

View File

@ -7,8 +7,9 @@
package org.hibernate.boot.registry.selector; package org.hibernate.boot.registry.selector;
/** /**
* Describes the registration of a named strategy implementation. A strategy + selector name should resolve * Describes the registration of a named strategy implementation.
* to a single implementation. * <p>
* A strategy + selector name should resolve to a single implementation.
* *
* @param <T> The type of the strategy described by this implementation registration. * @param <T> The type of the strategy described by this implementation registration.
* *

View File

@ -7,16 +7,18 @@
package org.hibernate.boot.registry.selector; package org.hibernate.boot.registry.selector;
/** /**
* Responsible for providing the registrations of strategy selector(s). Can be registered directly with the * Responsible for providing the registrations of one or more strategy selectors.
* {@link org.hibernate.boot.registry.BootstrapServiceRegistry} or located via discovery. * <p>
* Can be registered directly with the {@link org.hibernate.boot.registry.BootstrapServiceRegistry}
* or located via discovery.
* *
* @author Steve Ebersole * @author Steve Ebersole
*/ */
public interface StrategyRegistrationProvider { public interface StrategyRegistrationProvider {
/** /**
* Get all StrategyRegistrations announced by this provider. * Get all {@link StrategyRegistration}s announced by this provider.
* *
* @return All StrategyRegistrations * @return All {@link StrategyRegistration}s
*/ */
Iterable<StrategyRegistration> getStrategyRegistrations(); Iterable<StrategyRegistration> getStrategyRegistrations();
} }

View File

@ -9,7 +9,7 @@ package org.hibernate.cache.spi.support;
import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor;
/** /**
* Specialization of {@link StorageAccess} for domain data regions * Specialization of {@link StorageAccess} for domain data regions.
* *
* @author Steve Ebersole * @author Steve Ebersole
*/ */

View File

@ -9,11 +9,11 @@ package org.hibernate.cache.spi.support;
import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor;
/** /**
* A general read/write abstraction over the specific "cache" * A general read/write abstraction over the specific "cache" object from the caching provider.
* object from the caching provider.
* *
* @apiNote Similar to {@link org.hibernate.cache.spi.access.CachedDomainDataAccess}, * @apiNote Similar to {@link org.hibernate.cache.spi.access.CachedDomainDataAccess},
* some methods represent "transactional" (access to Session) and some are non-"transactional" * some methods handle "transactional" access (access in the scope of a session),
* and some are non-"transactional" (for cache management outside a session).
* *
* @author Steve Ebersole * @author Steve Ebersole
*/ */

View File

@ -6,31 +6,25 @@
*/ */
/** /**
* Package intended for simplifying the worked needed to implement a caching provider. * This package provides a framework intended to reduce the work needed to implement
* Centers around the concept of {@link org.hibernate.cache.spi.support.StorageAccess} * a caching provider. It takes care of most of the "grunt work" associated with the
* and {@link org.hibernate.cache.spi.support.DomainDataStorageAccess} to implement * implementation, leaving the integrator to implement the interfaces
* most of the "grunt work" associated with the implementation. * {@link org.hibernate.cache.spi.support.StorageAccess} and
* {@link org.hibernate.cache.spi.support.DomainDataStorageAccess}.
* <p> * <p>
* A typical integration would just implement: * A typical integration would provide:
* <ol> * <ol>
* <li>a custom {@code StorageAccess}/{@code DomainDataStorageAccess}, along with * <li>a custom {@code StorageAccess} or {@code DomainDataStorageAccess}, along with
* <li>a custom {@link org.hibernate.cache.spi.support.RegionFactoryTemplate}, in * <li>a custom {@link org.hibernate.cache.spi.support.RegionFactoryTemplate}.
* particular:
* <ul>
* <li>{@link org.hibernate.cache.spi.support.RegionFactoryTemplate#createDomainDataStorageAccess}
* <li>{@link org.hibernate.cache.spi.support.RegionFactoryTemplate#createQueryResultsRegionStorageAccess}
* <li>{@link org.hibernate.cache.spi.support.RegionFactoryTemplate#createTimestampsRegionStorageAccess}
* </ul>
* </ol> * </ol>
* <p> * <p>
* Voila! Functioning cache provider. * The preferred way to register these implementations to Hibernate is via a custom
* <p>
* The preferred approach to "provide an integration" is through a custom
* {@link org.hibernate.boot.registry.selector.StrategyRegistrationProvider}. * {@link org.hibernate.boot.registry.selector.StrategyRegistrationProvider}.
* <p> * <p>
* Both {@code hibernate-testing} ({@code org.hibernate.testing.cache.CachingRegionFactory}) * Examples of using this support package to implement a caching provider include:
* and {@code hibernate-jcache} ({@code org.hibernate.cache.jcache.internal.JCacheRegionFactory}) * <ul>
* provide examples of using this support package to implement a caching * <li>{@code org.hibernate.testing.cache.CachingRegionFactory} in {@code hibernate-testing}, and
* provider. * <li>{@code org.hibernate.cache.jcache.internal.JCacheRegionFactory} in {@code hibernate-jcache}.
* </ul>
*/ */
package org.hibernate.cache.spi.support; package org.hibernate.cache.spi.support;