org.jboss.hibernate.jbc.cacheprovider
Class TreeCacheProvider
java.lang.Object
org.jboss.hibernate.jbc.cacheprovider.TreeCacheProvider
- All Implemented Interfaces:
- org.hibernate.cache.CacheProvider
- Direct Known Subclasses:
- OptimisticTreeCacheProvider
public class TreeCacheProvider
- extends Object
- implements org.hibernate.cache.CacheProvider
Support for a standalone JBoss Cache (TreeCache) instance. The JBoss Cache
is instantiated by this provider and is configured via a local config resource.
- Author:
- Brian Stansberry, Galder Zamarreno
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG_RESOURCE
public static final String CONFIG_RESOURCE
- Deprecated. use
Environment.CACHE_PROVIDER_CONFIG
- See Also:
- Constant Field Values
DEFAULT_CONFIG
public static final String DEFAULT_CONFIG
- See Also:
- Constant Field Values
LEGACY_DEFAULT_CONFIG
public static final String LEGACY_DEFAULT_CONFIG
- Deprecated. deprecared default configuration, use
DEFAULT_CONFIG instead.
- See Also:
- Constant Field Values
TreeCacheProvider
public TreeCacheProvider()
buildCache
public org.hibernate.cache.Cache buildCache(String regionName,
Properties properties)
throws org.hibernate.cache.CacheException
- Construct and configure the Cache representation of a named cache region.
- Specified by:
buildCache in interface org.hibernate.cache.CacheProvider
- Parameters:
regionName - the name of the cache regionproperties - configuration settings
- Returns:
- The Cache representation of the named cache region.
- Throws:
org.hibernate.cache.CacheException - Indicates an error building the cache region.
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestamp in interface org.hibernate.cache.CacheProvider
isOptimistic
public boolean isOptimistic()
start
public void start(Properties properties)
- Prepare the underlying JBossCache TreeCache instance.
- Specified by:
start in interface org.hibernate.cache.CacheProvider
- Parameters:
properties - All current config settings.
- Throws:
org.hibernate.cache.CacheException - Indicates a problem preparing cache for use.
stop
public void stop()
- Specified by:
stop in interface org.hibernate.cache.CacheProvider
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()
- Specified by:
isMinimalPutsEnabledByDefault in interface org.hibernate.cache.CacheProvider
getUnderlyingCache
public org.jboss.cache.TreeCache getUnderlyingCache()
configFileExists
protected boolean configFileExists(String configFile)
Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.