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 NoCachingRegionFactory
INSTANCE
Singleton 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 DomainDataRegion
buildDomainDataRegion(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext)
Create a namedRegion
for holding domain model dataQueryResultsRegion
buildQueryResultsRegion(String regionName, SessionFactoryImplementor sessionFactory)
Create a namedRegion
for holding query result sets.TimestampsRegion
buildTimestampsRegion(String regionName, SessionFactoryImplementor sessionFactory)
Create a namedRegion
for holding timestamps used to determine when a cached query result set is stale.CacheTransactionSynchronization
createTransactionContext(SharedSessionContractImplementor session)
AccessType
getDefaultAccessType()
Get the default access type for any "user model" data.boolean
isMinimalPutsEnabledByDefault()
By default, should we perform "minimal puts" when using this second level cache implementation?long
nextTimestamp()
Generate a timestamp.String
qualify(String regionName)
void
start(SessionFactoryOptions settings, Map<String,Object> configValues)
Lifecycle callback to perform any necessary initialization of the underlying cache provider.void
stop()
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:RegionFactory
Lifecycle callback to perform any necessary initialization of the underlying cache provider. Called exactly once during the construction of aSessionFactoryImpl
.- Specified by:
start
in 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 stopSessionFactory
building.
-
stop
public void stop()
Description copied from interface:Stoppable
Stop phase notification
-
qualify
public String qualify(String regionName)
- Specified by:
qualify
in interfaceRegionFactory
-
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()
Description copied from interface:RegionFactory
By default, should we perform "minimal puts" when using this second level cache implementation?- Specified by:
isMinimalPutsEnabledByDefault
in interfaceRegionFactory
- Returns:
- True if "minimal puts" should be performed by default; false otherwise.
-
getDefaultAccessType
public AccessType getDefaultAccessType()
Description copied from interface:RegionFactory
Get the default access type for any "user model" data.- Specified by:
getDefaultAccessType
in interfaceRegionFactory
-
nextTimestamp
public long nextTimestamp()
Description copied from interface:RegionFactory
Generate 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 theCacheTransactionSynchronization
created by thisRegionFactory
.- Specified by:
nextTimestamp
in interfaceRegionFactory
-
createTransactionContext
public CacheTransactionSynchronization createTransactionContext(SharedSessionContractImplementor session)
- Specified by:
createTransactionContext
in interfaceRegionFactory
-
buildDomainDataRegion
public DomainDataRegion buildDomainDataRegion(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext)
Description copied from interface:RegionFactory
Create a namedRegion
for holding domain model data- Specified by:
buildDomainDataRegion
in 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:RegionFactory
Create a namedRegion
for holding query result sets.- Specified by:
buildQueryResultsRegion
in interfaceRegionFactory
-
buildTimestampsRegion
public TimestampsRegion buildTimestampsRegion(String regionName, SessionFactoryImplementor sessionFactory)
Description copied from interface:RegionFactory
Create a namedRegion
for holding timestamps used to determine when a cached query result set is stale.- Specified by:
buildTimestampsRegion
in interfaceRegionFactory
-
-