public class AcquireLockException extends LockException
AcquireLockException indicates that a lock of a specific
type on an object can not be acquired since the object is already locked by
another locking object (and possibly with another type of lock). Since the
current lock can be released some time in the future, a retry could help.
InterruptedException.| Constructor and Description |
|---|
AcquireLockException(java.lang.Object lockedObject,
java.lang.Object lockOwner,
java.lang.Object lockAcquiringObject,
java.lang.String lockType)
Creates a new lock exception indicating that the designated
lockAcquiringObject can not acquire the lock of the
designated lockType since the lockedObject is
already locked (with the same lock type) by the designated
lockOwner. |
AcquireLockException(java.lang.Object lockedObject,
java.lang.Object lockAcquiringObject,
java.lang.String lockType)
Creates a new lock exception indicating that the designated
lockAcquiringObject can not acquire the lock of the
designated lockType since the lockedObject is
already locked (with the same lock type) but the current lock owner is
unknown. |
AcquireLockException(java.lang.Object lockedObject,
java.lang.Object lockOwner,
java.lang.String currentLockType,
java.lang.Object lockAcquiringObject,
java.lang.String acquiringLockType)
Creates a new lock exception indicating that the designated
lockAcquiringObject can not acquire the lock of the
designated acquiringLockType since the
lockedObject is already locked (with the
currentLockType) by the designated lockOwner. |
AcquireLockException(java.lang.Object lockedObject,
java.lang.String currentLockType,
java.lang.Object lockAcquiringObject,
java.lang.String acquiringLockType)
Creates a new lock exception indicating that the designated
lockAcquiringObject can not acquire the lock of the
designated acquiringLockType since the
lockedObject is already locked (with the
currentLockType) but the current lock owner is unknown. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAcquiringLockType()
Returns the type of the lock which was tried to being acquired.
|
java.lang.Object |
getAcquiringObject()
Returns the object that wants to acquire the lock.
|
java.lang.String |
getMessage() |
getLockedObject, getLockOwner, getLockTypepublic AcquireLockException(java.lang.Object lockedObject,
java.lang.Object lockAcquiringObject,
java.lang.String lockType)
lockAcquiringObject can not acquire the lock of the
designated lockType since the lockedObject is
already locked (with the same lock type) but the current lock owner is
unknown.lockedObject - The object that is currently locked and that should be
locked again.lockAcquiringObject - The object that wanted to acquire the lock which
lead to the created exception.lockType - The type of the lock which can not be acquired since it is
currently held on the object.public AcquireLockException(java.lang.Object lockedObject,
java.lang.String currentLockType,
java.lang.Object lockAcquiringObject,
java.lang.String acquiringLockType)
lockAcquiringObject can not acquire the lock of the
designated acquiringLockType since the
lockedObject is already locked (with the
currentLockType) but the current lock owner is unknown.lockedObject - The object that is currently locked and that should be
locked again.currentLockType - The type of the lock which is currently held on the
object.lockAcquiringObject - The object that wanted to acquire the lock which
lead to the created exception.acquiringLockType - The type of the lock which can not be acquired.public AcquireLockException(java.lang.Object lockedObject,
java.lang.Object lockOwner,
java.lang.Object lockAcquiringObject,
java.lang.String lockType)
lockAcquiringObject can not acquire the lock of the
designated lockType since the lockedObject is
already locked (with the same lock type) by the designated
lockOwner.lockedObject - The object that is currently locked and that should be
locked again.lockOwner - The object that currently locks the object.lockAcquiringObject - The object that wanted to acquire the lock which
lead to the created exception.lockType - The type of the lock which can not be acquired since it is
currently held on the object.public AcquireLockException(java.lang.Object lockedObject,
java.lang.Object lockOwner,
java.lang.String currentLockType,
java.lang.Object lockAcquiringObject,
java.lang.String acquiringLockType)
lockAcquiringObject can not acquire the lock of the
designated acquiringLockType since the
lockedObject is already locked (with the
currentLockType) by the designated lockOwner.lockedObject - The object that is currently locked and that should be
locked again.lockOwner - The object that currently locks the object.currentLockType - The type of the lock which is currently held on the
object.lockAcquiringObject - The object that wanted to acquire the lock which
lead to the created exception.acquiringLockType - The type of the lock which can not be acquired.public java.lang.Object getAcquiringObject()
public java.lang.String getAcquiringLockType()
lock type currently held.public java.lang.String getMessage()
getMessage in class java.lang.Throwable