org.hibernate.cache.jbc2
Interface CacheInstanceManager

All Known Implementing Classes:
JndiMultiplexingCacheInstanceManager, JndiSharedCacheInstanceManager, MultiplexingCacheInstanceManager, SharedCacheInstanceManager

public interface CacheInstanceManager

Acts as a buffer from how instances of Cache are built/obtained.

Author:
Steve Ebersole

Method Summary
 org.jboss.cache.Cache getCollectionCacheInstance()
          Retrieve a handle to the Cache instance to be used for storing collection data.
 org.jboss.cache.Cache getEntityCacheInstance()
          Retrieve a handle to the Cache instance to be used for storing entity data.
 org.jboss.cache.Cache getQueryCacheInstance()
          Retrieve a handle to the Cache instance to be used for storing query results.
 org.jboss.cache.Cache getTimestampsCacheInstance()
          Retrieve a handle to the Cache instance to be used for storing timestamps.
 void start(Settings settings, Properties properties)
          Lifecycle callback to perform any necessary initialization of the CacheInstanceManager.
 void stop()
          Lifecycle callback to perform any necessary cleanup of the underlying CacheInstanceManager.
 

Method Detail

getEntityCacheInstance

org.jboss.cache.Cache getEntityCacheInstance()
Retrieve a handle to the Cache instance to be used for storing entity data.

Returns:
The entity data cache instance.

getCollectionCacheInstance

org.jboss.cache.Cache getCollectionCacheInstance()
Retrieve a handle to the Cache instance to be used for storing collection data.

Returns:
The collection data cache instance.

getQueryCacheInstance

org.jboss.cache.Cache getQueryCacheInstance()
Retrieve a handle to the Cache instance to be used for storing query results.

Returns:
The query result cache instance.

getTimestampsCacheInstance

org.jboss.cache.Cache getTimestampsCacheInstance()
Retrieve a handle to the Cache instance to be used for storing timestamps.

Returns:
The timestamps cache instance.

start

void start(Settings settings,
           Properties properties)
           throws CacheException
Lifecycle callback to perform any necessary initialization of the CacheInstanceManager. Called exactly once during the construction of a SessionFactoryImpl.

Parameters:
settings - The settings in effect.
properties - The defined cfg properties
Throws:
CacheException - Indicates problems starting the L2 cache impl; considered as a sign to stop SessionFactory building.

stop

void stop()
Lifecycle callback to perform any necessary cleanup of the underlying CacheInstanceManager. Called exactly once during SessionFactory.close().



Copyright © null-null Red Hat Middleware, LLC. All Rights Reserved