com.hazelcast.hibernate.provider
Class HazelcastCacheProvider
java.lang.Object
com.hazelcast.hibernate.provider.HazelcastCacheProvider
- All Implemented Interfaces:
- org.hibernate.cache.CacheProvider
public final class HazelcastCacheProvider
- extends Object
- implements org.hibernate.cache.CacheProvider
Implementation of (deprecated) Hibernate CacheProvider interface for compatibility with pre-Hibernate
3.3.x code.
To enable, hibernate.cache.provider_class=com.hazelcast.hibernate.provider.HazelcastCacheProvider. This
cache provider relies on hazelcast.xml for cache configuration.
- Author:
- Leo Kim (lkim@limewire.com)
- See Also:
HazelcastCache,
HazelcastCacheRegionFactory
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HazelcastCacheProvider
public HazelcastCacheProvider()
HazelcastCacheProvider
public HazelcastCacheProvider(HazelcastInstance instance)
buildCache
public org.hibernate.cache.Cache buildCache(String name,
Properties properties)
throws org.hibernate.cache.CacheException
- We ignore the
Properties passed in here in favor of the hazelcast.xml file.
- Specified by:
buildCache in interface org.hibernate.cache.CacheProvider
- Throws:
org.hibernate.cache.CacheException
isMinimalPutsEnabledByDefault
public boolean isMinimalPutsEnabledByDefault()
- Specified by:
isMinimalPutsEnabledByDefault in interface org.hibernate.cache.CacheProvider
- Returns:
- true - for a large cluster, unnecessary puts will most likely slow things down.
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestamp in interface org.hibernate.cache.CacheProvider
start
public void start(Properties props)
throws org.hibernate.cache.CacheException
- Specified by:
start in interface org.hibernate.cache.CacheProvider
- Throws:
org.hibernate.cache.CacheException
getHazelcastInstance
public HazelcastInstance getHazelcastInstance()
stop
public void stop()
- Calls
Hazelcast.shutdown().
- Specified by:
stop in interface org.hibernate.cache.CacheProvider
Copyright © 2011 Hazel Bilisim Ltd.. All Rights Reserved.