com.im.commons 5.8

com.im.commons.progress
Class AlreadyLockedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalStateException
                  extended by com.im.commons.progress.AlreadyLockedException
All Implemented Interfaces:
Serializable

public class AlreadyLockedException
extends 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.

See Also:
Serialized Form

Constructor Summary
AlreadyLockedException(DFLockable lockable, String reason, Throwable trace)
          Creates a new instance of AlreadyLockedException
AlreadyLockedException(DFLockable lockable, String reason, Throwable trace, boolean lockedForever)
          Creates a new instance of AlreadyLockedException
 
Method Summary
 DFLockable getLockable()
           
 Throwable getLockedBy()
          The stack trace where the lockable was locked.
 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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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,
                              String reason,
                              Throwable trace)
Creates a new instance of AlreadyLockedException


AlreadyLockedException

public AlreadyLockedException(DFLockable lockable,
                              String reason,
                              Throwable trace,
                              boolean lockedForever)
Creates a new instance of AlreadyLockedException

Method Detail

getLockable

public DFLockable getLockable()

getLockedBy

public Throwable getLockedBy()
The stack trace where the lockable was locked.


getReason

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


com.im.commons 5.8