Package org.fcrepo.kernel.impl.lock
Class InMemoryResourceLockManager
- java.lang.Object
-
- org.fcrepo.kernel.impl.lock.InMemoryResourceLockManager
-
- All Implemented Interfaces:
ResourceLockManager
@Component public class InMemoryResourceLockManager extends Object implements ResourceLockManager
In memory resource lock manager- Author:
- pwinckles
-
-
Constructor Summary
Constructors Constructor Description InMemoryResourceLockManager()
-
Method Summary
All Methods Instance Methods Concrete 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
-
-
-
Constructor Detail
-
InMemoryResourceLockManager
public InMemoryResourceLockManager()
-
-
Method Detail
-
acquire
public void acquire(String txId, FedoraId resourceId)
Description copied from interface:ResourceLockManager
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.- Specified by:
acquire
in interfaceResourceLockManager
- Parameters:
txId
- the transaction id to associate the lock toresourceId
- the resource to lock
-
releaseAll
public void releaseAll(String txId)
Description copied from interface:ResourceLockManager
Releases all of the locks held by the transaction- Specified by:
releaseAll
in interfaceResourceLockManager
- Parameters:
txId
- the transaction id
-
-