Interface LockRepository
- All Superinterfaces:
- AutoCloseable,- Closeable
- All Known Implementing Classes:
- DefaultLockRepository
Encapsulation of the SQL shunting that is needed for locks. A 
JdbcLockRegistry
 needs a reference to a spring-managed (transactional) client service, so this component
 has to be declared as a bean.- Since:
- 4.3
- Author:
- Dave Syer, Alexandre Strubel, Artem Bilan
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAcquire a lock for a key.voidclose()voidRemove a lock from this repository.voidRemove all the expired locks.booleanisAcquired(String lock) Check if a lock is held by this repository.booleanRenew the lease for a lock.
- 
Method Details- 
isAcquiredCheck if a lock is held by this repository.- Parameters:
- lock- the lock to check.
- Returns:
- acquired or not.
 
- 
deleteRemove a lock from this repository.- Parameters:
- lock- the lock to remove.
 
- 
deleteExpiredvoid deleteExpired()Remove all the expired locks.
- 
acquireAcquire a lock for a key.- Parameters:
- lock- the key for lock to acquire.
- Returns:
- acquired or not.
 
- 
renewRenew the lease for a lock.- Parameters:
- lock- the lock to renew.
- Returns:
- renewed or not.
 
- 
closevoid close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
 
-