Interface ExpirableLockRegistry
- All Superinterfaces:
LockRegistry
public interface ExpirableLockRegistry extends LockRegistry
A
LockRegistry
implementing this interface supports the removal of aged locks
that are not currently locked.- Since:
- 4.2
-
Method Summary
Modifier and Type Method Description void
expireUnusedOlderThan(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:
java.lang.IllegalStateException
- if the registry configuration does not support this feature.
-