|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.repository.NullLockManager
public class NullLockManager
LockManager implementation that does nothing. Can be useful in cases where a repository extending from the LockingRepository
needs to be configured to ignore locks, for example in scenario's
where an underlying storage mechanism already performs the necessary locking.
Constructor Summary | |
---|---|
NullLockManager()
|
Method Summary | |
---|---|
void |
obtainLock(Object aggregateIdentifier)
Obtain a lock for an aggregate with the given aggregateIdentifier . |
void |
releaseLock(Object aggregateIdentifier)
Release the lock held for an aggregate with the given aggregateIdentifier . |
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 NullLockManager()
Method Detail |
---|
public boolean validateLock(AggregateRoot aggregate)
validateLock
in interface LockManager
aggregate
- the aggregate to validate the lock for
public void obtainLock(Object aggregateIdentifier)
aggregateIdentifier
. Depending on the strategy, this
method may return immediately or block until a lock is held.
This implementation does nothing.
obtainLock
in interface LockManager
aggregateIdentifier
- the identifier of the aggregate to obtains a lock for.public void releaseLock(Object aggregateIdentifier)
aggregateIdentifier
. The caller of this
method must ensure a valid lock was requested using LockManager.obtainLock(Object)
. If no lock was successfully
obtained, the behavior of this method is undefined.
This implementation does nothing.
releaseLock
in interface LockManager
aggregateIdentifier
- the identifier of the aggregate to release the lock for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |