Class AlreadyLockedException

  • All Implemented Interfaces:
    java.io.Serializable

    public class AlreadyLockedException
    extends java.lang.IllegalStateException
    This exception is thrown from a DFLockable.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 AlreadyLockedException
      AlreadyLockedException​(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.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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

      • 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.