Package com.im.commons.progress
Class AlreadyLockedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalStateException
-
- com.im.commons.progress.AlreadyLockedException
-
- All Implemented Interfaces:
java.io.Serializable
public class AlreadyLockedException extends java.lang.IllegalStateException
This exception is thrown from aDFLockable.obtainLock(java.lang.String)
when the object is already locked. The Exception can provide information on what exactly object has caused the operation to fail, what was the reason of its locked state and who has locked it.- Author:
- svata
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AlreadyLockedException(DFLockable lockable, java.lang.String reason, java.lang.Throwable trace)
Creates a new instance of AlreadyLockedExceptionAlreadyLockedException(DFLockable lockable, java.lang.String reason, java.lang.Throwable trace, boolean lockedForever)
Creates a new instance of AlreadyLockedException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DFLockable
getLockable()
java.lang.Throwable
getLockedBy()
The stack trace where the lockable was locked.java.lang.String
getReason()
boolean
isLockedForever()
Return true if lockable is locked forever, which typically means that user does not have appropriate access rights and so no changes are allowed.
-
-
-
Constructor Detail
-
AlreadyLockedException
public AlreadyLockedException(DFLockable lockable, java.lang.String reason, java.lang.Throwable trace)
Creates a new instance of AlreadyLockedException
-
AlreadyLockedException
public AlreadyLockedException(DFLockable lockable, java.lang.String reason, java.lang.Throwable trace, boolean lockedForever)
Creates a new instance of AlreadyLockedException
-
-
Method Detail
-
getLockable
public DFLockable getLockable()
-
getLockedBy
public java.lang.Throwable getLockedBy()
The stack trace where the lockable was locked.
-
getReason
public java.lang.String getReason()
-
isLockedForever
public boolean isLockedForever()
Return true if lockable is locked forever, which typically means that user does not have appropriate access rights and so no changes are allowed.
-
-