com.kuka.resource.locking
Class LockPriority

java.lang.Object
  extended by com.kuka.resource.locking.LockPriority
All Implemented Interfaces:
Serializable

public final class LockPriority
extends Object
implements Serializable

A priority for lock requests.

Higher priorities (which can be tested with isHigherThan(LockPriority)) can take away (preempt) existing locks with lower priorities.

See Also:
Serialized Form

Field Summary
static LockPriority DEFAULT
          Constant for default lock priority.
static LockPriority HIGHEST
          Constant for highest lock priority.
static int HIGHEST_VALUE
          The nominal value of the highest priority.
static LockPriority LOWEST
          Constant for lowest lock priority.
static int LOWEST_VALUE
          The nominal value of the lowest priority.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean isHigherThan(LockPriority other)
          Return true if this priority is higher than the other priority, i.e. if this priority can preempt locks taken with the other priority, for example.
 String toString()
           
 int value()
           
static LockPriority valueOf(int priority)
          Constructs a new LockPriority from a integer value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HIGHEST_VALUE

public static final int HIGHEST_VALUE
The nominal value of the highest priority.

See Also:
Constant Field Values

LOWEST_VALUE

public static final int LOWEST_VALUE
The nominal value of the lowest priority.

See Also:
Constant Field Values

HIGHEST

public static final LockPriority HIGHEST
Constant for highest lock priority.


LOWEST

public static final LockPriority LOWEST
Constant for lowest lock priority.


DEFAULT

public static final LockPriority DEFAULT
Constant for default lock priority.

Method Detail

valueOf

public static LockPriority valueOf(int priority)
Constructs a new LockPriority from a integer value.

Parameters:
priority - Priority range 100 (lowest priority) ... 10 (highest priority)
Returns:
LockPriority object for the specified priority.

isHigherThan

public boolean isHigherThan(LockPriority other)
Return true if this priority is higher than the other priority, i.e. if this priority can preempt locks taken with the other priority, for example.

Parameters:
other - another priority
Returns:
true if the this priority is higher, false otherwise.

value

public int value()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2019. All rights reserved.