com.atlassian.confluence.cache.hazelcast.hibernate
Class HazelcastLockingCache<K,V>

java.lang.Object
  extended by com.atlassian.confluence.cache.DefaultConfluenceCache<K,V>
      extended by com.atlassian.confluence.cache.hazelcast.hibernate.HazelcastLockingCache<K,V>
All Implemented Interfaces:
com.atlassian.cache.Cache<K,V>, com.atlassian.cache.ManagedCache, ConfigurableCache<K,V>, ConfluenceCache<K,V>, LockingCache<K,V>

@Internal
public class HazelcastLockingCache<K,V>
extends DefaultConfluenceCache<K,V>
implements LockingCache<K,V>

A delegating cache that allows you to lock and unlock on keys. It delegates all other operations other than lock() and unlock() to the underlying cache.

Since:
5.7

Constructor Summary
HazelcastLockingCache(HazelcastHelper hazelCastHelper, com.atlassian.cache.Cache<K,V> delegate)
           
 
Method Summary
 void lock(K key, org.joda.time.Duration leaseTime)
           
 void unlock(K key)
           
 
Methods inherited from class com.atlassian.confluence.cache.DefaultConfluenceCache
addListener, clear, containsKey, currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, get, get, getDelegate, getKeys, getManagedDelegate, getName, getStatistics, isFlushable, isLocal, isReplicateAsynchronously, isReplicateViaCopy, put, putIfAbsent, remove, remove, removeAll, removeListener, replace, setTimeToLive, updateExpireAfterAccess, updateExpireAfterWrite, updateMaxEntries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.cache.ManagedCache
clear, currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getName, getStatistics, isFlushable, isLocal, isReplicateAsynchronously, isReplicateViaCopy, updateExpireAfterAccess, updateExpireAfterWrite, updateMaxEntries
 
Methods inherited from interface com.atlassian.confluence.cache.ConfigurableCache
setTimeToLive
 
Methods inherited from interface com.atlassian.cache.Cache
addListener, containsKey, get, get, getKeys, getName, put, putIfAbsent, remove, remove, removeAll, removeListener, replace
 

Constructor Detail

HazelcastLockingCache

public HazelcastLockingCache(HazelcastHelper hazelCastHelper,
                             com.atlassian.cache.Cache<K,V> delegate)
Method Detail

lock

public void lock(K key,
                 org.joda.time.Duration leaseTime)
Specified by:
lock in interface LockingCache<K,V>

unlock

public void unlock(K key)
Specified by:
unlock in interface LockingCache<K,V>


Copyright © 2003–2015 Atlassian. All rights reserved.