Package org.hibernate.cache.internal
Class NoCachingRegionFactory
java.lang.Object
org.hibernate.cache.internal.NoCachingRegionFactory
- All Implemented Interfaces:
Serializable
,RegionFactory
,Service
,Stoppable
Factory used if no caching enabled in config...
- See Also:
-
Field Summary
FieldsFields inherited from interface org.hibernate.cache.spi.RegionFactory
DEFAULT_QUERY_RESULTS_REGION_UNQUALIFIED_NAME, DEFAULT_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildDomainDataRegion
(DomainDataRegionConfig regionConfig, DomainDataRegionBuildingContext buildingContext) Create a namedRegion
for holding domain model databuildQueryResultsRegion
(String regionName, SessionFactoryImplementor sessionFactory) Create a namedRegion
for holding query result sets.buildTimestampsRegion
(String regionName, SessionFactoryImplementor sessionFactory) Create a namedRegion
for holding timestamps used to determine when a cached query result set is stale.Get the default access type for any "user model" data.boolean
By default, should we perform "minimal puts" when using this second level cache implementation?long
Generate a timestamp.void
start
(SessionFactoryOptions settings, Map<String, Object> configValues) Lifecycle callback to perform any necessary initialization of the underlying cache provider.void
stop()
Stop phase notificationMethods 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 Details
-
INSTANCE
Singleton access
-
-
Constructor Details
-
NoCachingRegionFactory
public NoCachingRegionFactory()Constructs a NoCachingRegionFactory. Although access should generally useINSTANCE
-
-
Method Details
-
start
public void start(SessionFactoryOptions settings, Map<String, Object> configValues) throws CacheExceptionDescription 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
- 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
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
-
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
-