Package org.hibernate.cache.internal
Class NoCachingRegionFactory
- java.lang.Object
-
- org.hibernate.cache.internal.NoCachingRegionFactory
-
- All Implemented Interfaces:
Serializable,RegionFactory,Service,Stoppable
public class NoCachingRegionFactory extends Object implements RegionFactory
Factory used if no caching enabled in config...- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static NoCachingRegionFactoryINSTANCESingleton access-
Fields inherited from interface org.hibernate.cache.spi.RegionFactory
DEFAULT_QUERY_RESULTS_REGION_UNQUALIFIED_NAME, DEFAULT_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAME
-
-
Constructor Summary
Constructors Constructor Description NoCachingRegionFactory()Constructs a NoCachingRegionFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DomainDataRegionbuildDomainDataRegion(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext)Create a namedRegionfor holding domain model dataQueryResultsRegionbuildQueryResultsRegion(String regionName, SessionFactoryImplementor sessionFactory)Create a namedRegionfor holding query result sets.TimestampsRegionbuildTimestampsRegion(String regionName, SessionFactoryImplementor sessionFactory)Create a namedRegionfor holding timestamps used to determine when a cached query result set is stale.CacheTransactionSynchronizationcreateTransactionContext(SharedSessionContractImplementor session)AccessTypegetDefaultAccessType()Get the default access type for any "user model" data.booleanisMinimalPutsEnabledByDefault()By default, should we perform "minimal puts" when using this second level cache implementation?longnextTimestamp()Generate a timestamp.Stringqualify(String regionName)voidstart(SessionFactoryOptions settings, Map<String,Object> configValues)Lifecycle callback to perform any necessary initialization of the underlying cache provider.voidstop()Stop phase notification-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.cache.spi.RegionFactory
getTimeout
-
-
-
-
Field Detail
-
INSTANCE
public static final NoCachingRegionFactory INSTANCE
Singleton access
-
-
Constructor Detail
-
NoCachingRegionFactory
public NoCachingRegionFactory()
Constructs a NoCachingRegionFactory. Although access should generally useINSTANCE
-
-
Method Detail
-
start
public void start(SessionFactoryOptions settings, Map<String,Object> configValues) throws CacheException
Description copied from interface:RegionFactoryLifecycle callback to perform any necessary initialization of the underlying cache provider. Called exactly once during the construction of aSessionFactoryImpl.- Specified by:
startin interfaceRegionFactory- Parameters:
settings- The settings in effect.configValues- The available config values- Throws:
CacheException- Indicates problems starting the L2 cache impl; considered as a sign to stopSessionFactorybuilding.
-
stop
public void stop()
Description copied from interface:StoppableStop phase notification
-
qualify
public String qualify(String regionName)
- Specified by:
qualifyin interfaceRegionFactory
-
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()
Description copied from interface:RegionFactoryBy default, should we perform "minimal puts" when using this second level cache implementation?- Specified by:
isMinimalPutsEnabledByDefaultin interfaceRegionFactory- Returns:
- True if "minimal puts" should be performed by default; false otherwise.
-
getDefaultAccessType
public AccessType getDefaultAccessType()
Description copied from interface:RegionFactoryGet the default access type for any "user model" data.- Specified by:
getDefaultAccessTypein interfaceRegionFactory
-
nextTimestamp
public long nextTimestamp()
Description copied from interface:RegionFactoryGenerate a timestamp. This value is generally used for purpose of locking/unlocking cache content depending upon the access strategy being used. It's also expected that this be the value used by theCacheTransactionSynchronizationcreated by thisRegionFactory.- Specified by:
nextTimestampin interfaceRegionFactory
-
createTransactionContext
public CacheTransactionSynchronization createTransactionContext(SharedSessionContractImplementor session)
- Specified by:
createTransactionContextin interfaceRegionFactory
-
buildDomainDataRegion
public DomainDataRegion buildDomainDataRegion(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext)
Description copied from interface:RegionFactoryCreate a namedRegionfor holding domain model data- Specified by:
buildDomainDataRegionin interfaceRegionFactory- Parameters:
regionConfig- The user requested caching configuration for this RegionbuildingContext- Access to delegates useful in building the Region
-
buildQueryResultsRegion
public QueryResultsRegion buildQueryResultsRegion(String regionName, SessionFactoryImplementor sessionFactory)
Description copied from interface:RegionFactoryCreate a namedRegionfor holding query result sets.- Specified by:
buildQueryResultsRegionin interfaceRegionFactory
-
buildTimestampsRegion
public TimestampsRegion buildTimestampsRegion(String regionName, SessionFactoryImplementor sessionFactory)
Description copied from interface:RegionFactoryCreate a namedRegionfor holding timestamps used to determine when a cached query result set is stale.- Specified by:
buildTimestampsRegionin interfaceRegionFactory
-
-