Interface ExpirableLockRegistry
- All Superinterfaces:
LockRegistry
- All Known Implementing Classes:
JdbcLockRegistry,RedisLockRegistry,ZookeeperLockRegistry
public interface ExpirableLockRegistry extends LockRegistry
A
LockRegistry implementing this interface supports the removal of aged locks
that are not currently locked.- Since:
- 4.2
- Author:
- Gary Russell
-
Method Summary
Modifier and Type Method Description voidexpireUnusedOlderThan(long age)Remove locks last acquired more than 'age' ago that are not currently locked.
-
Method Details
-
expireUnusedOlderThan
void expireUnusedOlderThan(long age)Remove locks last acquired more than 'age' ago that are not currently locked.- Parameters:
age- the time since the lock was last obtained.- Throws:
IllegalStateException- if the registry configuration does not support this feature.
-