public interface RegionFactory
Properties
)start(org.hibernate.cfg.Settings, java.util.Properties)
being called. For an example, have a look at
RegionFactoryCacheProviderBridge
where we need the properties in order to determine which legacy
CacheProvider
to use so that we can answer the
isMinimalPutsEnabledByDefault()
question for the
SettingsFactory
.Modifier and Type | Method and Description |
---|---|
CollectionRegion |
buildCollectionRegion(String regionName,
Properties properties,
CacheDataDescription metadata)
Build a cache region specialized for storing collection data.
|
EntityRegion |
buildEntityRegion(String regionName,
Properties properties,
CacheDataDescription metadata)
Build a cache region specialized for storing entity data.
|
QueryResultsRegion |
buildQueryResultsRegion(String regionName,
Properties properties)
Build a cache region specialized for storing query results
|
TimestampsRegion |
buildTimestampsRegion(String regionName,
Properties properties)
Build a cache region specialized for storing update-timestamps data.
|
AccessType |
getDefaultAccessType()
Get the default access type for
entity and
collection regions. |
boolean |
isMinimalPutsEnabledByDefault()
By default should we perform "minimal puts" when using this second
level cache implementation?
|
long |
nextTimestamp()
Generate a timestamp.
|
void |
start(Settings settings,
Properties properties)
Lifecycle callback to perform any necessary initialization of the
underlying cache implementation(s).
|
void |
stop()
Lifecycle callback to perform any necessary cleanup of the underlying
cache implementation(s).
|
void start(Settings settings, Properties properties) throws CacheException
SessionFactoryImpl
.settings
- The settings in effect.properties
- The defined cfg propertiesCacheException
- Indicates problems starting the L2 cache impl;
considered as a sign to stop SessionFactory
building.void stop()
SessionFactory.close()
.boolean isMinimalPutsEnabledByDefault()
AccessType getDefaultAccessType()
entity
and
collection
regions.long nextTimestamp()
EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException
regionName
- The name of the region.properties
- Configuration properties.metadata
- Information regarding the type of data to be cachedCacheException
- Indicates problems building the region.CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException
regionName
- The name of the region.properties
- Configuration properties.metadata
- Information regarding the type of data to be cachedCacheException
- Indicates problems building the region.QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) throws CacheException
regionName
- The name of the region.properties
- Configuration properties.CacheException
- Indicates problems building the region.TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws CacheException
regionName
- The name of the region.properties
- Configuration properties.CacheException
- Indicates problems building the region.Copyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved