Interface LockStore<R,O>
- Type Parameters:
R- The type of the resource subject to lockingO- The type of the owner of locks
- All Known Implementing Classes:
LockStoreImpl
public interface LockStore<R,O>
Interface to manage a set of read/write locks for a set of resources
- Author:
- Claus Stadler
-
Method Summary
Modifier and TypeMethodDescriptiongetLockByKey(Path<String> lockKey) getLockForResource(String resource) Get the API to manage read/write locks for a given resourceGet a stream of all existing resource locks The resulting stream should be weakly consistent (See invalid input: '{@link Files#list(java.nio.file.Path)). The result stream should always be used in a try-with-resources block in order to ensure release of resources.'
-
Method Details
-
getLockForResource
Get the API to manage read/write locks for a given resource- Parameters:
resource-- Returns:
-
getLockByKey
-
streamResourceLocks
Get a stream of all existing resource locks The resulting stream should be weakly consistent (See invalid input: '{@link Files#list(java.nio.file.Path)). The result stream should always be used in a try-with-resources block in order to ensure release of resources.'- Returns:
- Throws:
IOException
-