org.openspaces.hibernate.cache
Class TransactionalGigaMapCacheProvider
java.lang.Object
org.openspaces.hibernate.cache.TransactionalGigaMapCacheProvider
- All Implemented Interfaces:
- org.hibernate.cache.CacheProvider
public class TransactionalGigaMapCacheProvider
- extends Object
- implements org.hibernate.cache.CacheProvider
An Open Spaces Hibernate second level cache provider using the GigaMap
interface. Allowing to simplify the usage of Hibernate second level cache when
using Spring based applications.
Relies on the externally constructed GigaMap
which
is then passed to this cache provider with thread local context. Before Hibernate
is configured within Spring, a bean with this cache provider should configured
calling setMapContext(org.openspaces.core.GigaMap)
.
Builds TransactionalGigaMapCache
as the cache implementation.
- Author:
- kimchy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransactionalGigaMapCacheProvider
public TransactionalGigaMapCacheProvider()
setMapContext
public static void setMapContext(GigaMap gigaMap)
setGigaMap
public void setGigaMap(GigaMap gigaMap)
start
public void start(Properties properties)
throws org.hibernate.cache.CacheException
- Specified by:
start
in interface org.hibernate.cache.CacheProvider
- Throws:
org.hibernate.cache.CacheException
stop
public void stop()
- Specified by:
stop
in interface org.hibernate.cache.CacheProvider
buildCache
public org.hibernate.cache.Cache buildCache(String regionName,
Properties properties)
throws org.hibernate.cache.CacheException
- Specified by:
buildCache
in interface org.hibernate.cache.CacheProvider
- Throws:
org.hibernate.cache.CacheException
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestamp
in interface org.hibernate.cache.CacheProvider
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()
- Specified by:
isMinimalPutsEnabledByDefault
in interface org.hibernate.cache.CacheProvider
Copyright © GigaSpaces.