HHH-12599 : Add Javadoc indicating that region names do not include a prefix
This commit is contained in:
parent
83283218dc
commit
eee04e2e9a
|
@ -76,6 +76,11 @@ public class DomainDataRegionConfigImpl implements DomainDataRegionConfig {
|
||||||
private List<NaturalIdDataCachingConfig> naturalIdConfigs;
|
private List<NaturalIdDataCachingConfig> naturalIdConfigs;
|
||||||
private List<CollectionDataCachingConfig> collectionConfigs;
|
private List<CollectionDataCachingConfig> collectionConfigs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a {@link Builder}
|
||||||
|
*
|
||||||
|
* @param regionName - the unqualified region name
|
||||||
|
*/
|
||||||
public Builder(String regionName) {
|
public Builder(String regionName) {
|
||||||
this.regionName = regionName;
|
this.regionName = regionName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,20 @@ package org.hibernate.cache.cfg.spi;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.hibernate.boot.spi.SessionFactoryOptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration for a named region for caching domain data
|
* Configuration for a named region for caching domain data.
|
||||||
|
* A region's name is "unqualified"; i.e. it is not prefixed by
|
||||||
|
* {@link SessionFactoryOptions#getCacheRegionPrefix()}.
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface DomainDataRegionConfig {
|
public interface DomainDataRegionConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the unqualified name of this region.
|
||||||
|
*/
|
||||||
String getRegionName();
|
String getRegionName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,13 +6,17 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.cache.spi;
|
package org.hibernate.cache.spi;
|
||||||
|
|
||||||
|
import org.hibernate.boot.spi.SessionFactoryOptions;
|
||||||
import org.hibernate.cache.CacheException;
|
import org.hibernate.cache.CacheException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contract for a named "region". The concept of a Region might not
|
* Contract for a named "region". The concept of a Region might not
|
||||||
* necessarily correlate to a specific concept in the underlying caching
|
* necessarily correlate to a specific concept in the underlying caching
|
||||||
* provider - it is just a thing that can be referenced by name later.
|
* provider - it is just a thing that can be referenced by name later.
|
||||||
*
|
* <p/>
|
||||||
|
* A region's name is "unqualified"; i.e. it is not prefixed by
|
||||||
|
* {@link SessionFactoryOptions#getCacheRegionPrefix()}.
|
||||||
|
* <p/>
|
||||||
* Region is the base contract defining some common characteristics
|
* Region is the base contract defining some common characteristics
|
||||||
* regardless of the type of data intended to be stored within this
|
* regardless of the type of data intended to be stored within this
|
||||||
* Region. The more specific sub-types are {@link DomainDataRegion}
|
* Region. The more specific sub-types are {@link DomainDataRegion}
|
||||||
|
@ -24,7 +28,7 @@ import org.hibernate.cache.CacheException;
|
||||||
*/
|
*/
|
||||||
public interface Region {
|
public interface Region {
|
||||||
/**
|
/**
|
||||||
* Retrieve the name of this region.
|
* Retrieve the unqualified name of this region.
|
||||||
*/
|
*/
|
||||||
String getName();
|
String getName();
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,12 @@ public abstract class AbstractRegion implements Region {
|
||||||
private final String name;
|
private final String name;
|
||||||
private final RegionFactory regionFactory;
|
private final RegionFactory regionFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs an {@link AbstractRegion}.
|
||||||
|
*
|
||||||
|
* @param name - the unqualified region name
|
||||||
|
* @param regionFactory - the region factory
|
||||||
|
*/
|
||||||
public AbstractRegion(String name, RegionFactory regionFactory) {
|
public AbstractRegion(String name, RegionFactory regionFactory) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.regionFactory = regionFactory;
|
this.regionFactory = regionFactory;
|
||||||
|
|
|
@ -18,6 +18,13 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||||
public abstract class DirectAccessRegionTemplate extends AbstractRegion implements DirectAccessRegion {
|
public abstract class DirectAccessRegionTemplate extends AbstractRegion implements DirectAccessRegion {
|
||||||
private final StorageAccess storageAccess;
|
private final StorageAccess storageAccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a {@link DirectAccessRegionTemplate}.
|
||||||
|
*
|
||||||
|
* @param name - the unqualified region name
|
||||||
|
* @param regionFactory - the region factory
|
||||||
|
* @param storageAccess - the cache storage access strategy
|
||||||
|
*/
|
||||||
public DirectAccessRegionTemplate(String name, RegionFactory regionFactory, StorageAccess storageAccess) {
|
public DirectAccessRegionTemplate(String name, RegionFactory regionFactory, StorageAccess storageAccess) {
|
||||||
super( name, regionFactory );
|
super( name, regionFactory );
|
||||||
this.storageAccess = storageAccess;
|
this.storageAccess = storageAccess;
|
||||||
|
|
|
@ -13,6 +13,13 @@ import org.hibernate.cache.spi.RegionFactory;
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class QueryResultsRegionTemplate extends DirectAccessRegionTemplate implements QueryResultsRegion {
|
public class QueryResultsRegionTemplate extends DirectAccessRegionTemplate implements QueryResultsRegion {
|
||||||
|
/**
|
||||||
|
* Constructs a {@link QueryResultsRegionTemplate}.
|
||||||
|
*
|
||||||
|
* @param name - the unqualified region name
|
||||||
|
* @param regionFactory - the region factory
|
||||||
|
* @param storageAccess - the cache storage access strategy
|
||||||
|
*/
|
||||||
public QueryResultsRegionTemplate(
|
public QueryResultsRegionTemplate(
|
||||||
String name,
|
String name,
|
||||||
RegionFactory regionFactory,
|
RegionFactory regionFactory,
|
||||||
|
|
|
@ -13,6 +13,13 @@ import org.hibernate.cache.spi.TimestampsRegion;
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class TimestampsRegionTemplate extends DirectAccessRegionTemplate implements TimestampsRegion {
|
public class TimestampsRegionTemplate extends DirectAccessRegionTemplate implements TimestampsRegion {
|
||||||
|
/**
|
||||||
|
* Constructs a {@link TimestampsRegionTemplate}.
|
||||||
|
*
|
||||||
|
* @param name - the unqualified region name
|
||||||
|
* @param regionFactory - the region factory
|
||||||
|
* @param storageAccess - the cache storage access strategy
|
||||||
|
*/
|
||||||
public TimestampsRegionTemplate(
|
public TimestampsRegionTemplate(
|
||||||
String name,
|
String name,
|
||||||
RegionFactory regionFactory,
|
RegionFactory regionFactory,
|
||||||
|
|
Loading…
Reference in New Issue