com.kuka.resource.locking
Class ResourceAlreadyLockedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.kuka.resource.locking.LockException
              extended by com.kuka.resource.locking.ResourceAlreadyLockedException
All Implemented Interfaces:
Serializable

public class ResourceAlreadyLockedException
extends LockException

The exception signals that a resource is already locked by another application.

See Also:
Serialized Form

Constructor Summary
ResourceAlreadyLockedException(LockPriority priority)
          Constructs a new exception with the priority of the current lock holder.
ResourceAlreadyLockedException(String currentHolderName, LockPriority priority)
          Constructs a new exception with the priority of the current lock holder.
 
Method Summary
 LockPriority getPriority()
          Returns the priority of the lock holder.
 
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

ResourceAlreadyLockedException

public ResourceAlreadyLockedException(String currentHolderName,
                                      LockPriority priority)
Constructs a new exception with the priority of the current lock holder.

Parameters:
currentHolderName - name of the current lock holder
priority - The priority of the current lock holder.

ResourceAlreadyLockedException

public ResourceAlreadyLockedException(LockPriority priority)
Constructs a new exception with the priority of the current lock holder.

Parameters:
priority - The priority of the current lock holder.
Method Detail

getPriority

public LockPriority getPriority()
Returns the priority of the lock holder. A lock attempt with a higher priority will succeed as long as the lock holder is unchanged.

Returns:
the priority of the lock holder


Copyright © 2019. All rights reserved.