|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.repository.PessimisticLockManager
public class PessimisticLockManager
Implementation of the LockManager that uses a pessimistic locking strategy. Calls to obtainLock will block
until a lock could be obtained. If a lock is obtained by a thread, that thread has guaranteed unique access.
| Constructor Summary | |
|---|---|
PessimisticLockManager()
|
|
| Method Summary | |
|---|---|
void |
obtainLock(Object aggregateIdentifier)
Obtain a lock for an aggregate. |
void |
releaseLock(Object aggregateIdentifier)
Release the lock held on the aggregate. |
boolean |
validateLock(AggregateRoot aggregate)
Make sure that the current thread holds a valid lock for the given aggregate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PessimisticLockManager()
| Method Detail |
|---|
public boolean validateLock(AggregateRoot aggregate)
validateLock in interface LockManageraggregate - the aggregate to validate the lock for
public void obtainLock(Object aggregateIdentifier)
obtainLock in interface LockManageraggregateIdentifier - the identifier of the aggregate to obtains a lock for.public void releaseLock(Object aggregateIdentifier)
releaseLock in interface LockManageraggregateIdentifier - the identifier of the aggregate to release the lock for.
IllegalStateException - if no lock was ever obtained for this aggregate
IllegalMonitorStateException - if a lock was obtained, but is not currently held by the current thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||