Package ubic.gemma.persistence.cache
Class EhcacheKeyLock
- java.lang.Object
- 
- ubic.gemma.persistence.cache.EhcacheKeyLock
 
- 
- All Implemented Interfaces:
- CacheKeyLock
 
 public class EhcacheKeyLock extends Object implements CacheKeyLock - Author:
- poirigui
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface ubic.gemma.persistence.cache.CacheKeyLockCacheKeyLock.LockAcquisition
 
- 
 - 
Constructor SummaryConstructors Constructor Description EhcacheKeyLock(net.sf.ehcache.Ehcache cache, Object key, boolean readOnly)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisReadOnly()Indicate if this lock is read-only.CacheKeyLock.LockAcquisitionlock()Acquire a lock on the cache key.CacheKeyLock.LockAcquisitionlockInterruptibly()Acquire a lock interruptibly on a cache key.voidsetLockCheckIntervalMillis(long lockCheckIntervalMillis)Set the interval to check for lock acquisition in milliseconds whenlockInterruptibly()is used.
 
- 
- 
- 
Constructor Detail- 
EhcacheKeyLockpublic EhcacheKeyLock(net.sf.ehcache.Ehcache cache, Object key, boolean readOnly)
 
- 
 - 
Method Detail- 
isReadOnlypublic boolean isReadOnly() Description copied from interface:CacheKeyLockIndicate if this lock is read-only.- Specified by:
- isReadOnlyin interface- CacheKeyLock
 
 - 
setLockCheckIntervalMillispublic void setLockCheckIntervalMillis(long lockCheckIntervalMillis) Set the interval to check for lock acquisition in milliseconds whenlockInterruptibly()is used.This defaults to 30000 ms. 
 - 
lockpublic CacheKeyLock.LockAcquisition lock() Description copied from interface:CacheKeyLockAcquire a lock on the cache key.- Specified by:
- lockin interface- CacheKeyLock
 
 - 
lockInterruptiblypublic CacheKeyLock.LockAcquisition lockInterruptibly() throws InterruptedException Description 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
 
 
- 
 
-