Package ubic.gemma.persistence.cache
Class EhcacheKeyLock
java.lang.Object
ubic.gemma.persistence.cache.EhcacheKeyLock
- All Implemented Interfaces:
CacheKeyLock
- Author:
- poirigui
-
Nested Class Summary
Nested classes/interfaces inherited from interface ubic.gemma.persistence.cache.CacheKeyLock
CacheKeyLock.LockAcquisition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicate if this lock is read-only.lock()
Acquire a lock on the cache key.Acquire a lock interruptibly on a cache key.void
setLockCheckIntervalMillis
(long lockCheckIntervalMillis) Set the interval to check for lock acquisition in milliseconds whenlockInterruptibly()
is used.
-
Constructor Details
-
EhcacheKeyLock
-
-
Method Details
-
isReadOnly
public boolean isReadOnly()Description copied from interface:CacheKeyLock
Indicate if this lock is read-only.- Specified by:
isReadOnly
in interfaceCacheKeyLock
-
setLockCheckIntervalMillis
public void setLockCheckIntervalMillis(long lockCheckIntervalMillis) Set the interval to check for lock acquisition in milliseconds whenlockInterruptibly()
is used.This defaults to 30000 ms.
-
lock
Description copied from interface:CacheKeyLock
Acquire a lock on the cache key.- Specified by:
lock
in interfaceCacheKeyLock
-
lockInterruptibly
Description copied from interface:CacheKeyLock
Acquire a lock interruptibly on a cache key.- Specified by:
lockInterruptibly
in interfaceCacheKeyLock
- Throws:
InterruptedException
- if the current thread was interrupted prior to or while waiting on the lock
-