public class HazelcastHibernateCache extends Object implements com.atlassian.hibernate.extras.tangosol.AtlassianHibernateCache
Cache
interface.Constructor and Description |
---|
HazelcastHibernateCache(LockingCache cache,
com.hazelcast.core.Cluster cluster) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
void |
destroy() |
Object |
get(Object key) |
int |
getTimeout() |
<T,K,V> T |
invoke(K key,
com.atlassian.hibernate.extras.tangosol.CacheEntryProcessor<K,V,T> processor)
Since we're talking to the anæmic
LockingCache interface here, we can't make use of Hazelcast's
entry processor API. |
void |
lock(Object key) |
long |
nextTimestamp() |
void |
put(Object key,
Object value) |
void |
remove(Object key) |
void |
unlock(Object key) |
public HazelcastHibernateCache(LockingCache cache, com.hazelcast.core.Cluster cluster)
public Object get(Object key) throws net.sf.hibernate.cache.CacheException
get
in interface net.sf.hibernate.cache.Cache
net.sf.hibernate.cache.CacheException
public void put(Object key, Object value) throws net.sf.hibernate.cache.CacheException
put
in interface net.sf.hibernate.cache.Cache
net.sf.hibernate.cache.CacheException
public void remove(Object key) throws net.sf.hibernate.cache.CacheException
remove
in interface net.sf.hibernate.cache.Cache
net.sf.hibernate.cache.CacheException
public void clear() throws net.sf.hibernate.cache.CacheException
clear
in interface net.sf.hibernate.cache.Cache
net.sf.hibernate.cache.CacheException
public void destroy() throws net.sf.hibernate.cache.CacheException
destroy
in interface net.sf.hibernate.cache.Cache
net.sf.hibernate.cache.CacheException
public void lock(Object key) throws net.sf.hibernate.cache.CacheException
lock
in interface net.sf.hibernate.cache.Cache
net.sf.hibernate.cache.CacheException
public void unlock(Object key) throws net.sf.hibernate.cache.CacheException
unlock
in interface net.sf.hibernate.cache.Cache
net.sf.hibernate.cache.CacheException
public long nextTimestamp()
nextTimestamp
in interface net.sf.hibernate.cache.Cache
public int getTimeout()
getTimeout
in interface net.sf.hibernate.cache.Cache
public boolean containsKey(Object key) throws net.sf.hibernate.cache.CacheException
containsKey
in interface com.atlassian.hibernate.extras.tangosol.AtlassianHibernateCache
net.sf.hibernate.cache.CacheException
public <T,K,V> T invoke(K key, com.atlassian.hibernate.extras.tangosol.CacheEntryProcessor<K,V,T> processor) throws net.sf.hibernate.cache.CacheException
LockingCache
interface here, we can't make use of Hazelcast's
entry processor API. Damn shame.invoke
in interface com.atlassian.hibernate.extras.tangosol.AtlassianHibernateCache
net.sf.hibernate.cache.CacheException
Copyright © 2003–2016 Atlassian. All rights reserved.