GigaSpaces XAP 9.7.2 API

org.openspaces.hibernate.cache
Class SimpleGigaMapCacheProvider

java.lang.Object
  extended by org.openspaces.hibernate.cache.SimpleGigaMapCacheProvider
All Implemented Interfaces:
org.hibernate.cache.CacheProvider

public class SimpleGigaMapCacheProvider
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 SimpleGigaMapCache as the cache implementation.

Author:
kimchy

Constructor Summary
SimpleGigaMapCacheProvider()
           
 
Method Summary
 org.hibernate.cache.Cache buildCache(String regionName, Properties properties)
           
 boolean isMinimalPutsEnabledByDefault()
           
 long nextTimestamp()
           
 void setGigaMap(GigaMap gigaMap)
           
static void setMapContext(GigaMap gigaMap)
           
 void start(Properties properties)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleGigaMapCacheProvider

public SimpleGigaMapCacheProvider()
Method Detail

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

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.