Package org.fcrepo.kernel.api.lock
Interface ResourceLockManager
-
- All Known Implementing Classes:
InMemoryResourceLockManager
public interface ResourceLockManager
Responsible for managing write locks on Fedora resources- Author:
- pwinckles
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
acquire(String txId, FedoraId resourceId)
Acquires a lock on the resource, associating it to the txId.void
releaseAll(String txId)
Releases all of the locks held by the transaction
-
-
-
Method Detail
-
acquire
void acquire(String txId, FedoraId resourceId)
Acquires a lock on the resource, associating it to the txId. If the lock is held by a different transaction, an exception is thrown. If the lock is already held by the same transaction, then it returns successfully.- Parameters:
txId
- the transaction id to associate the lock toresourceId
- the resource to lock- Throws:
ConcurrentUpdateException
- when lock cannot be acquired
-
releaseAll
void releaseAll(String txId)
Releases all of the locks held by the transaction- Parameters:
txId
- the transaction id
-
-