Class StaticCacheKeyLock
java.lang.Object
ubic.gemma.persistence.cache.StaticCacheKeyLock
- All Implemented Interfaces:
- CacheKeyLock
Implementation of the 
CacheKeyLock interface that uses a static week map to store locks by key.
Locks are guaranteed to be kept around as long as there is a CacheKeyLock.LockAcquisition
referring to it, otherwise they might be freed by the GC.
- Author:
- poirigui
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface CacheKeyLockCacheKeyLock.LockAcquisition
- 
Constructor SummaryConstructorsConstructorDescriptionStaticCacheKeyLock(org.springframework.cache.Cache cache, Object key, boolean readOnly) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanIndicate if this lock is read-only.lock()Acquire a lock on the cache key.Acquire a lock interruptibly on a cache key.
- 
Constructor Details- 
StaticCacheKeyLock
 
- 
- 
Method Details- 
isReadOnlypublic boolean isReadOnly()Description copied from interface:CacheKeyLockIndicate if this lock is read-only.- Specified by:
- isReadOnlyin interface- CacheKeyLock
 
- 
lockDescription copied from interface:CacheKeyLockAcquire a lock on the cache key.- Specified by:
- lockin interface- CacheKeyLock
 
- 
lockInterruptiblyDescription copied from interface:CacheKeyLockAcquire a lock interruptibly on a cache key.- Specified by:
- lockInterruptiblyin interface- CacheKeyLock
- Throws:
- InterruptedException- if the current thread was interrupted prior to or while waiting on the lock
 
 
-