Package org.hibernate.cache.impl
Class NoCachingRegionFactory
java.lang.Object
org.hibernate.cache.impl.NoCachingRegionFactory
- All Implemented Interfaces:
RegionFactory
Factory used if no caching enabled in config...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) Build a cache region specialized for storing collection data.buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) Build a cache region specialized for storing entity data.buildQueryResultsRegion(String regionName, Properties properties) Build a cache region specialized for storing query resultsbuildTimestampsRegion(String regionName, Properties properties) Build a cache region specialized for storing update-timestamps data.Get the default access type forentityandcollectionregions.booleanBy default should we perform "minimal puts" when using this second level cache implementation?longGenerate a timestamp.voidstart(Settings settings, Properties properties) Lifecycle callback to perform any necessary initialization of the underlying cache implementation(s).voidstop()Lifecycle callback to perform any necessary cleanup of the underlying cache implementation(s).
-
Constructor Details
-
NoCachingRegionFactory
-
-
Method Details
-
start
Description copied from interface:RegionFactoryLifecycle callback to perform any necessary initialization of the underlying cache implementation(s). Called exactly once during the construction of aSessionFactoryImpl.- Specified by:
startin interfaceRegionFactory- Parameters:
settings- The settings in effect.properties- The defined cfg properties- Throws:
CacheException- Indicates problems starting the L2 cache impl; considered as a sign to stopSessionFactorybuilding.
-
stop
public void stop()Description copied from interface:RegionFactoryLifecycle callback to perform any necessary cleanup of the underlying cache implementation(s). Called exactly once duringSessionFactory.close().- Specified by:
stopin 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
Description copied from interface:RegionFactoryGet the default access type forentityandcollectionregions.- Specified by:
getDefaultAccessTypein interfaceRegionFactory- Returns:
- This factory's default access type.
-
nextTimestamp
public long nextTimestamp()Description copied from interface:RegionFactoryGenerate a timestamp. This is generally used for cache content locking/unlocking purposes depending upon the access-strategy being used.- Specified by:
nextTimestampin interfaceRegionFactory- Returns:
- The generated timestamp.
-
buildEntityRegion
public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException Description copied from interface:RegionFactoryBuild a cache region specialized for storing entity data.- Specified by:
buildEntityRegionin interfaceRegionFactory- Parameters:
regionName- The name of the region.properties- Configuration properties.metadata- Information regarding the type of data to be cached- Returns:
- The built region
- Throws:
CacheException- Indicates problems building the region.
-
buildCollectionRegion
public CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException Description copied from interface:RegionFactoryBuild a cache region specialized for storing collection data.- Specified by:
buildCollectionRegionin interfaceRegionFactory- Parameters:
regionName- The name of the region.properties- Configuration properties.metadata- Information regarding the type of data to be cached- Returns:
- The built region
- Throws:
CacheException- Indicates problems building the region.
-
buildQueryResultsRegion
public QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) throws CacheException Description copied from interface:RegionFactoryBuild a cache region specialized for storing query results- Specified by:
buildQueryResultsRegionin interfaceRegionFactory- Parameters:
regionName- The name of the region.properties- Configuration properties.- Returns:
- The built region
- Throws:
CacheException- Indicates problems building the region.
-
buildTimestampsRegion
public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws CacheException Description copied from interface:RegionFactoryBuild a cache region specialized for storing update-timestamps data.- Specified by:
buildTimestampsRegionin interfaceRegionFactory- Parameters:
regionName- The name of the region.properties- Configuration properties.- Returns:
- The built region
- Throws:
CacheException- Indicates problems building the region.
-