站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

CacheProvider (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.cache
Interface CacheProvider

All Known Implementing Classes:
EhCacheProvider, HashtableCacheProvider, JCSCacheProvider, OSCacheProvider, SwarmCacheProvider, TreeCacheProvider

public interface CacheProvider

Support for pluggable caches.

Author:
Gavin King

Method Summary
 Cache buildCache(String regionName, Properties properties)
          Configure the cache
 long nextTimestamp()
          Generate a timestamp
 void start(Properties properties)
          Callback to perform any necessary initialization of the underlying cache implementation during SessionFactory construction.
 void stop()
          Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close().
 

Method Detail

buildCache

public Cache buildCache(String regionName,
                        Properties properties)
                 throws CacheException
Configure the cache

Parameters:
regionName - the name of the cache region
properties - configuration settings
Throws:
CacheException

nextTimestamp

public long nextTimestamp()
Generate a timestamp


start

public void start(Properties properties)
           throws CacheException
Callback to perform any necessary initialization of the underlying cache implementation during SessionFactory construction.

Parameters:
properties - current configuration settings.
Throws:
CacheException

stop

public void stop()
Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close().