Top Description Fields Constructors Methods
org.hibernate.cache.impl.bridge

public Class RegionFactoryCacheProviderBridge

extends Object
implements RegionFactory
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.RegionFactory
Imports
java.util.Properties, org.slf4j.Logger, .LoggerFactory, org.hibernate.cache.RegionFactory, .CacheProvider, .CacheException, .EntityRegion, .CollectionRegion, .QueryResultsRegion, .NoCacheProvider, .TimestampsRegion, .CacheDataDescription, org.hibernate.cache.access.AccessType, org.hibernate.util.PropertiesHelper, .ReflectHelper, org.hibernate.cfg.Environment, .Settings

Acts as a bridge between the RegionFactory contract and the older CacheProvider contract.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private CacheProvider
cacheProvider

Deprecated as a consequence of CacheProvider being deprecated.
public static final String
private static final Logger
private Settings

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CollectionRegion
buildCollectionRegion(String
The name of the region.
regionName
,
Properties
Configuration properties.
properties
,
CacheDataDescription
Information regarding the type of data to be cached
metadata
)

Implements org.hibernate.cache.RegionFactory.buildCollectionRegion.

Build a cache region specialized for storing collection data.
public EntityRegion
buildEntityRegion(String
The name of the region.
regionName
,
Properties
Configuration properties.
properties
,
CacheDataDescription
Information regarding the type of data to be cached
metadata
)

Implements org.hibernate.cache.RegionFactory.buildEntityRegion.

Build a cache region specialized for storing entity data.
public QueryResultsRegion
buildQueryResultsRegion(String
The name of the region.
regionName
,
Properties
Configuration properties.
properties
)

Implements org.hibernate.cache.RegionFactory.buildQueryResultsRegion.

Build a cache region specialized for storing query results
public TimestampsRegion
buildTimestampsRegion(String
The name of the region.
regionName
,
Properties
Configuration properties.
properties
)

Implements org.hibernate.cache.RegionFactory.buildTimestampsRegion.

Build a cache region specialized for storing update-timestamps data.
public CacheProvider
getCacheProvider()

Deprecated as a consequence of CacheProvider being deprecated.
public AccessType
getDefaultAccessType()

Implements org.hibernate.cache.RegionFactory.getDefaultAccessType.

Get the default access type for entity and collection regions.
public boolean
isMinimalPutsEnabledByDefault()

Implements org.hibernate.cache.RegionFactory.isMinimalPutsEnabledByDefault.

By default should we perform "minimal puts" when using this second level cache implementation?
public long
public void
start(Settings
The settings in effect.
settings
,
Properties
The defined cfg properties
properties
)

Implements org.hibernate.cache.RegionFactory.start.

Lifecycle callback to perform any necessary initialization of the underlying cache implementation(s).
public void
stop()

Implements org.hibernate.cache.RegionFactory.stop.

Lifecycle callback to perform any necessary cleanup of the underlying cache implementation(s).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheProviderback to summary
private CacheProvider cacheProvider

Deprecated

as a consequence of CacheProvider being deprecated. See corresponding docs for further information.

DEF_PROVIDERback to summary
public static final String DEF_PROVIDER
logback to summary
private static final Logger log
settingsback to summary
private Settings settings

Constructor Detail

RegionFactoryCacheProviderBridgeback to summary
public RegionFactoryCacheProviderBridge(Properties properties)

Method Detail

buildCollectionRegionback to summary
public CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException

Implements org.hibernate.cache.RegionFactory.buildCollectionRegion.

Doc from org.hibernate.cache.RegionFactory.buildCollectionRegion.

Build a cache region specialized for storing collection data.

Parameters
regionName:String

The name of the region.

properties:Properties

Configuration properties.

metadata:CacheDataDescription

Information regarding the type of data to be cached

Returns:CollectionRegion

The built region

Exceptions
CacheException:
Indicates problems building the region.
buildEntityRegionback to summary
public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException

Implements org.hibernate.cache.RegionFactory.buildEntityRegion.

Doc from org.hibernate.cache.RegionFactory.buildEntityRegion.

Build a cache region specialized for storing entity data.

Parameters
regionName:String

The name of the region.

properties:Properties

Configuration properties.

metadata:CacheDataDescription

Information regarding the type of data to be cached

Returns:EntityRegion

The built region

Exceptions
CacheException:
Indicates problems building the region.
buildQueryResultsRegionback to summary
public QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) throws CacheException

Implements org.hibernate.cache.RegionFactory.buildQueryResultsRegion.

Doc from org.hibernate.cache.RegionFactory.buildQueryResultsRegion.

Build a cache region specialized for storing query results

Parameters
regionName:String

The name of the region.

properties:Properties

Configuration properties.

Returns:QueryResultsRegion

The built region

Exceptions
CacheException:
Indicates problems building the region.
buildTimestampsRegionback to summary
public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws CacheException

Implements org.hibernate.cache.RegionFactory.buildTimestampsRegion.

Doc from org.hibernate.cache.RegionFactory.buildTimestampsRegion.

Build a cache region specialized for storing update-timestamps data.

Parameters
regionName:String

The name of the region.

properties:Properties

Configuration properties.

Returns:TimestampsRegion

The built region

Exceptions
CacheException:
Indicates problems building the region.
getCacheProviderback to summary
public CacheProvider getCacheProvider()

Deprecated

as a consequence of CacheProvider being deprecated. See corresponding docs for further information.

getDefaultAccessTypeback to summary
public AccessType getDefaultAccessType()

Implements org.hibernate.cache.RegionFactory.getDefaultAccessType.

Doc from org.hibernate.cache.RegionFactory.getDefaultAccessType.

Get the default access type for entity and collection regions.

Returns:AccessType

This factory's default access type.

isMinimalPutsEnabledByDefaultback to summary
public boolean isMinimalPutsEnabledByDefault()

Implements org.hibernate.cache.RegionFactory.isMinimalPutsEnabledByDefault.

Doc from org.hibernate.cache.RegionFactory.isMinimalPutsEnabledByDefault.

By default should we perform "minimal puts" when using this second level cache implementation?

Returns:boolean

True if "minimal puts" should be performed by default; false otherwise.

nextTimestampback to summary
public long nextTimestamp()

Implements org.hibernate.cache.RegionFactory.nextTimestamp.

Doc from org.hibernate.cache.RegionFactory.nextTimestamp.

Generate a timestamp.

This is generally used for cache content locking/unlocking purposes depending upon the access-strategy being used.

Returns:long

The generated timestamp.

startback to summary
public void start(Settings settings, Properties properties) throws CacheException

Implements org.hibernate.cache.RegionFactory.start.

Doc from org.hibernate.cache.RegionFactory.start.

Lifecycle callback to perform any necessary initialization of the underlying cache implementation(s). Called exactly once during the construction of a org.hibernate.impl.SessionFactoryImpl.

Parameters
settings:Settings

The settings in effect.

properties:Properties

The defined cfg properties

Exceptions
CacheException:
Indicates problems starting the L2 cache impl; considered as a sign to stop org.hibernate.SessionFactory building.
stopback to summary
public void stop()

Implements org.hibernate.cache.RegionFactory.stop.

Doc from org.hibernate.cache.RegionFactory.stop.

Lifecycle callback to perform any necessary cleanup of the underlying cache implementation(s). Called exactly once during org.hibernate.SessionFactory#close.