Package nl.vpro.util.locker
Interface ObjectLocker.Listener
- All Superinterfaces:
EventListener
- Enclosing class:
- ObjectLocker
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
event
(ObjectLocker.Listener.Type type, ObjectLocker.LockHolder<?> holder, Duration duration) Called for lock eventdefault void
lock
(ObjectLocker.LockHolder<?> lock, Duration duration) default void
unlock
(ObjectLocker.LockHolder<?> lock, Duration duration)
-
Method Details
-
event
Called for lock event- Parameters:
type
- What happens to the lock (lock, or unlock)holder
- The relevantObjectLocker.LockHolder
duration
- How long it took to obtain/release this lock
-
lock
-
unlock
-