org.hibernate.cache
Class JndiBoundTreeCacheProvider
java.lang.Object
org.hibernate.cache.AbstractJndiBoundCacheProvider
org.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JndiBoundTreeCacheProvider
public JndiBoundTreeCacheProvider()
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 regionproperties
- 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()