Package org.hibernate.cache.spi
Class AbstractRegionFactory
- java.lang.Object
-
- org.hibernate.cache.spi.AbstractRegionFactory
-
- All Implemented Interfaces:
java.io.Serializable,RegionFactory,Service,Stoppable
- Direct Known Subclasses:
RegionFactoryTemplate
public abstract class AbstractRegionFactory extends java.lang.Object implements RegionFactory
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>LEGACY_QUERY_RESULTS_REGION_UNQUALIFIED_NAMESLegacy names that used to be the default for the query results region.static java.util.List<java.lang.String>LEGACY_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAMESLegacy names that used to be the default for the update timestamps region.-
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 AbstractRegionFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CacheTransactionSynchronizationcreateTransactionContext(SharedSessionContractImplementor session)AccessTypegetDefaultAccessType()Get the default access type for any "user model" dataprotected SessionFactoryOptionsgetOptions()longgetTimeout()booleanisMinimalPutsEnabledByDefault()By default should we perform "minimal puts" when using this second level cache implementation?protected booleanisStarted()longnextTimestamp()Generate a timestamp.protected abstract voidprepareForUse(SessionFactoryOptions settings, java.util.Map configValues)java.lang.Stringqualify(java.lang.String regionName)protected abstract voidreleaseFromUse()voidstart(SessionFactoryOptions settings, java.util.Map configValues)Lifecycle callback to perform any necessary initialization of the underlying cache provider.voidstop()Stop phase notificationprotected booleanverifiedStartStatus()protected voidverifyStarted()-
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
buildDomainDataRegion, buildQueryResultsRegion, buildTimestampsRegion
-
-
-
-
Field Detail
-
LEGACY_QUERY_RESULTS_REGION_UNQUALIFIED_NAMES
public static final java.util.List<java.lang.String> LEGACY_QUERY_RESULTS_REGION_UNQUALIFIED_NAMES
Legacy names that used to be the default for the query results region.
-
LEGACY_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAMES
public static final java.util.List<java.lang.String> LEGACY_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAMES
Legacy names that used to be the default for the update timestamps region.
-
-
Method Detail
-
isStarted
protected boolean isStarted()
-
verifyStarted
protected void verifyStarted()
-
verifiedStartStatus
protected boolean verifiedStartStatus()
-
getOptions
protected SessionFactoryOptions getOptions()
-
start
public final void start(SessionFactoryOptions settings, java.util.Map 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.
-
prepareForUse
protected abstract void prepareForUse(SessionFactoryOptions settings, java.util.Map configValues)
-
stop
public final void stop()
Description copied from interface:StoppableStop phase notification
-
releaseFromUse
protected abstract void releaseFromUse()
-
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
-
qualify
public java.lang.String qualify(java.lang.String regionName)
- Specified by:
qualifyin interfaceRegionFactory
-
createTransactionContext
public CacheTransactionSynchronization createTransactionContext(SharedSessionContractImplementor session)
- Specified by:
createTransactionContextin 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. The intended consumer of this method is the Session to manage itsSharedSessionContractImplementor.getTransactionStartTimestamp()value. It is also expected that this be the value used for this's RegionFactory's CacheTransactionContext- Specified by:
nextTimestampin interfaceRegionFactory
-
getTimeout
public long getTimeout()
- Specified by:
getTimeoutin interfaceRegionFactory
-
-