Save This Page
Home » Hibernate-3.3.2.GA » org.hibernate » cache » [javadoc | source]
org.hibernate.cache
public interface: RegionFactory [javadoc | source]

All Known Implementing Classes:
    NoCachingRegionFactory, JndiMultiplexedJBossCacheRegionFactory, JBossCacheRegionFactory, RegionFactoryCacheProviderBridge, JndiSharedJBossCacheRegionFactory, SharedJBossCacheRegionFactory, MultiplexedJBossCacheRegionFactory

Contract for building second level cache regions.

Implementors should define a constructor in one of two forms:

Use the first when we need to read config properties prior to #start being called. For an example, have a look at org.hibernate.cache.impl.bridge.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 org.hibernate.cfg.SettingsFactory .
Method from org.hibernate.cache.RegionFactory Summary:
buildCollectionRegion,   buildEntityRegion,   buildQueryResultsRegion,   buildTimestampsRegion,   isMinimalPutsEnabledByDefault,   nextTimestamp,   start,   stop
Method from org.hibernate.cache.RegionFactory Detail:
 public CollectionRegion buildCollectionRegion(String regionName,
    Properties properties,
    CacheDataDescription metadata) throws CacheException
    Build a cache region specialized for storing collection data.
 public EntityRegion buildEntityRegion(String regionName,
    Properties properties,
    CacheDataDescription metadata) throws CacheException
    Build a cache region specialized for storing entity data.
 public QueryResultsRegion buildQueryResultsRegion(String regionName,
    Properties properties) throws CacheException
    Build a cache region specialized for storing query results
 public TimestampsRegion buildTimestampsRegion(String regionName,
    Properties properties) throws CacheException
    Build a cache region specialized for storing update-timestamps data.
 public boolean isMinimalPutsEnabledByDefault()
    By default should we perform "minimal puts" when using this second level cache implementation?
 public long nextTimestamp()
    Generate a timestamp.

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

 public  void start(Settings settings,
    Properties properties) throws CacheException
    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 .
 public  void stop()