Interface LockMonitoring<T extends Lock>
-
- All Known Implementing Classes:
LockCleaner,LockMonitoring.Wrapper,LockTracking
@InternalUseOnly public interface LockMonitoring<T extends Lock>
Interface to support monitoring and cleaning of locks.- Author:
- HÃ¥vard M. Ottestad
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLockMonitoring.Wrapper<T extends Lock>
-
Field Summary
Fields Modifier and Type Field Description static intINITIAL_WAIT_TO_COLLECT
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LockgetLock()default LockgetLock(String alias)Lockregister(T lock)default booleanrequiresManualCleanup()default voidrunCleanup()LocktryLock()voidunregister(Lock lock)TunsafeInnerLock(Lock lock)static <T extends Lock>
LockMonitoring<T>wrap(Lock.ExtendedSupplier<T> supplier)
-
-
-
Field Detail
-
INITIAL_WAIT_TO_COLLECT
static final int INITIAL_WAIT_TO_COLLECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLock
Lock getLock() throws InterruptedException
- Throws:
InterruptedException
-
tryLock
Lock tryLock()
-
getLock
default Lock getLock(String alias) throws InterruptedException
- Throws:
InterruptedException
-
runCleanup
default void runCleanup()
-
requiresManualCleanup
default boolean requiresManualCleanup()
-
wrap
static <T extends Lock> LockMonitoring<T> wrap(Lock.ExtendedSupplier<T> supplier)
-
unregister
void unregister(Lock lock)
-
-