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

JndiBoundTreeCacheProvider (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.cache
Class JndiBoundTreeCacheProvider

java.lang.Object
  extended byorg.hibernate.cache.AbstractJndiBoundCacheProvider
      extended byorg.hibernate.cache.JndiBoundTreeCacheProvider
All Implemented Interfaces:
CacheProvider

public class JndiBoundTreeCacheProvider
extends AbstractJndiBoundCacheProvider

Support for JBossCache (TreeCache), where the cache instance is available via JNDI lookup.

Author:
Steve Ebersole

Constructor Summary
JndiBoundTreeCacheProvider()
           
 
Method Summary
 Cache buildCache(String regionName, Properties properties)
          Construct a Cache representing the "region" within in the underlying cache provider.
 org.jboss.cache.TreeCache getTreeCacheInstance()
           
 boolean isMinimalPutsEnabledByDefault()
          By default, should minimal-puts mode be enabled when using this cache.
 long nextTimestamp()
          Generate a timestamp
 void prepare(Properties properties)
           
 
Methods inherited from class org.hibernate.cache.AbstractJndiBoundCacheProvider
getCache, release, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiBoundTreeCacheProvider

public JndiBoundTreeCacheProvider()
Method Detail

buildCache

public Cache buildCache(String regionName,
                        Properties properties)
                 throws CacheException
Construct a Cache representing the "region" within in the underlying cache provider.

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

prepare

public void prepare(Properties properties)
             throws CacheException
Overrides:
prepare in class AbstractJndiBoundCacheProvider
Throws:
CacheException

nextTimestamp

public long nextTimestamp()
Generate a timestamp


isMinimalPutsEnabledByDefault

public boolean isMinimalPutsEnabledByDefault()
By default, should minimal-puts mode be enabled when using this cache.

Since TreeCache is a clusterable cache and we are only getting a reference the instance from JNDI, safest to assume a clustered setup and return true here.

Returns:
True.

getTreeCacheInstance

public org.jboss.cache.TreeCache getTreeCacheInstance()