|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cache.OptimisticTreeCacheProvider
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 theCONFIG_RESOURCE
config property.
Field Summary | |
static String |
CONFIG_RESOURCE
Deprecated. use Environment.CACHE_PROVIDER_CONFIG |
static String |
DEFAULT_CONFIG
|
Constructor Summary | |
OptimisticTreeCacheProvider()
|
Method Summary | |
Cache |
buildCache(String regionName,
Properties properties)
Construct and configure the Cache representation of a named cache region. |
org.jboss.cache.TreeCache |
getUnderlyingCache()
|
boolean |
isMinimalPutsEnabledByDefault()
|
long |
nextTimestamp()
Generate a timestamp |
void |
start(Properties properties)
Prepare the underlying JBossCache TreeCache instance. |
void |
stop()
Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CONFIG_RESOURCE
Environment.CACHE_PROVIDER_CONFIG
public static final String DEFAULT_CONFIG
Constructor Detail |
public OptimisticTreeCacheProvider()
Method Detail |
public Cache buildCache(String regionName, Properties properties) throws CacheException
buildCache
in interface CacheProvider
regionName
- the name of the cache regionproperties
- configuration settings
CacheException
- Indicates an error building the cache region.public long nextTimestamp()
CacheProvider
nextTimestamp
in interface CacheProvider
public void start(Properties properties)
start
in interface CacheProvider
properties
- All current config settings.
CacheException
- Indicates a problem preparing cache for use.public void stop()
CacheProvider
stop
in interface CacheProvider
public boolean isMinimalPutsEnabledByDefault()
isMinimalPutsEnabledByDefault
in interface CacheProvider
public org.jboss.cache.TreeCache getUnderlyingCache()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |