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 namedRegionfor holding domain model databuildQueryResultsRegion(String regionName, SessionFactoryImplementor sessionFactory) Create a namedRegionfor holding query result sets.buildTimestampsRegion(String regionName, SessionFactoryImplementor sessionFactory) Create a namedRegionfor holding timestamps used to determine when a cached query result set is stale.Get the default access type for any "user model" data.booleanBy default, should we perform "minimal puts" when using this second level cache implementation?longGenerate a timestamp.voidstart(SessionFactoryOptions settings, Map<String, Object> configValues) Lifecycle callback to perform any necessary initialization of the underlying cache provider.voidstop()Stop phase notificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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: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
- 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
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
-
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
-