Package org.axonframework.common.lock
Interface LockFactory
- All Known Implementing Classes:
NullLockFactory,PessimisticLockFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface to the lock factory. A lock factory produces locks on resources that are shared between threads.
- Since:
- 0.3
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionobtainLock(String identifier) Obtain a lock for a resource identified by givenidentifier.
-
Method Details
-
obtainLock
Obtain a lock for a resource identified by givenidentifier. Depending on the strategy, this method may return immediately or block until a lock is held.- Parameters:
identifier- the identifier of the resource to obtain a lock for.- Returns:
- a handle to release the lock.
-