public class HazelcastCacheStrategy extends Object implements net.sf.hibernate.cache.CacheConcurrencyStrategy
Constructor and Description |
---|
HazelcastCacheStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
afterInsert(Object key,
Object value,
Object version)
Add the new item to the cache, checking that no other transaction has accessed the item.
|
void |
afterUpdate(Object key,
Object value,
Object version,
net.sf.hibernate.cache.CacheConcurrencyStrategy.SoftLock clientLock)
Re-cache the updated state, if and only if there there are no other concurrent soft locks.
|
void |
clear() |
void |
destroy() |
void |
evict(Object key)
Do nothing.
|
Object |
get(Object key,
long txTimestamp)
Do not return an item whose timestamp is later than the current transaction timestamp.
|
void |
insert(Object key,
Object value)
Do nothing.
|
net.sf.hibernate.cache.CacheConcurrencyStrategy.SoftLock |
lock(Object key,
Object version)
Stop any other transactions reading or writing this item to/from the cache.
|
boolean |
put(Object key,
Object value,
long txTimestamp,
Object version,
Comparator versionComparator)
Do not add an item to the cache unless the current transaction timestamp is later than the timestamp at which the
item was invalidated.
|
void |
release(Object key,
net.sf.hibernate.cache.CacheConcurrencyStrategy.SoftLock clientLock)
Release the soft lock on the item.
|
void |
remove(Object key) |
void |
setCache(net.sf.hibernate.cache.Cache cache) |
void |
setMinimalPuts(boolean minimalPuts) |
void |
update(Object key,
Object value)
Do nothing.
|
public void setCache(net.sf.hibernate.cache.Cache cache)
setCache
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
public Object get(Object key, long txTimestamp) throws net.sf.hibernate.cache.CacheException
get
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public net.sf.hibernate.cache.CacheConcurrencyStrategy.SoftLock lock(Object key, Object version) throws net.sf.hibernate.cache.CacheException
lock
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public boolean put(Object key, Object value, long txTimestamp, Object version, Comparator versionComparator) throws net.sf.hibernate.cache.CacheException
put
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void release(Object key, net.sf.hibernate.cache.CacheConcurrencyStrategy.SoftLock clientLock) throws net.sf.hibernate.cache.CacheException
release
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void clear() throws net.sf.hibernate.cache.CacheException
clear
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void remove(Object key) throws net.sf.hibernate.cache.CacheException
remove
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void destroy()
destroy
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
public void afterUpdate(Object key, Object value, Object version, net.sf.hibernate.cache.CacheConcurrencyStrategy.SoftLock clientLock) throws net.sf.hibernate.cache.CacheException
afterUpdate
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void afterInsert(Object key, Object value, Object version) throws net.sf.hibernate.cache.CacheException
afterInsert
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void evict(Object key) throws net.sf.hibernate.cache.CacheException
evict
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void insert(Object key, Object value) throws net.sf.hibernate.cache.CacheException
insert
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void update(Object key, Object value) throws net.sf.hibernate.cache.CacheException
update
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.cache.CacheException
public void setMinimalPuts(boolean minimalPuts) throws net.sf.hibernate.HibernateException
setMinimalPuts
in interface net.sf.hibernate.cache.CacheConcurrencyStrategy
net.sf.hibernate.HibernateException
Copyright © 2003–2016 Atlassian. All rights reserved.