Interface Revocable<T>
- All Known Implementing Classes:
InterProcessMutex
,InterProcessReadWriteLock.ReadLock
,InterProcessReadWriteLock.WriteLock
public interface Revocable<T>
Specifies locks that can be revoked
-
Method Summary
Modifier and TypeMethodDescriptionvoid
makeRevocable
(RevocationListener<T> listener) Make the lock revocable.void
makeRevocable
(RevocationListener<T> listener, Executor executor) Make the lock revocable.
-
Method Details
-
makeRevocable
Make the lock revocable. Your listener will get called when another process/thread wants you to release the lock. Revocation is cooperative.- Parameters:
listener
- the listener
-
makeRevocable
Make the lock revocable. Your listener will get called when another process/thread wants you to release the lock. Revocation is cooperative.- Parameters:
listener
- the listenerexecutor
- executor for the listener
-