org.hibernate.cache
Class OptimisticTreeCacheProvider
java.lang.Object
org.hibernate.cache.OptimisticTreeCacheProvider
- All Implemented Interfaces:
- CacheProvider
public class OptimisticTreeCacheProvider
- extends Object
- implements CacheProvider
Support for a standalone JBossCache TreeCache instance utilizing TreeCache's
optimistic locking capabilities. This capability was added in JBossCache
version 1.3.0; as such this provider will only work with that version or
higher.
The TreeCache instance is configured via a local config resource. The
resource to be used for configuration can be controlled by specifying a value
for the CONFIG_RESOURCE config property.
- Author:
- Steve Ebersole
| 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
OptimisticTreeCacheProvider
public OptimisticTreeCacheProvider()
buildCache
public Cache buildCache(String regionName,
Properties properties)
throws CacheException
- Construct and configure the Cache representation of a named cache region.
- Specified by:
buildCache in interface CacheProvider
- Parameters:
regionName - the name of the cache regionproperties - configuration settings
- Returns:
- The Cache representation of the named cache region.
- Throws:
CacheException - Indicates an error building the cache region.
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestamp in interface CacheProvider
start
public void start(Properties properties)
- Prepare the underlying JBossCache TreeCache instance.
- Specified by:
start in interface CacheProvider
- Parameters:
properties - All current config settings.
- Throws:
CacheException - Indicates a problem preparing cache for use.
stop
public void stop()
- Specified by:
stop in interface CacheProvider
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()
- Specified by:
isMinimalPutsEnabledByDefault in interface CacheProvider
getUnderlyingCache
public org.jboss.cache.TreeCache getUnderlyingCache()
Copyright © 2009 Hibernate.org. All Rights Reserved.