pt.ua.concurrent
Enum GroupMutex.Priority

java.lang.Object
  extended by java.lang.Enum<GroupMutex.Priority>
      extended by pt.ua.concurrent.GroupMutex.Priority
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GroupMutex.Priority>
Enclosing class:
GroupMutex

public static enum GroupMutex.Priority
extends java.lang.Enum<GroupMutex.Priority>

Locking priority choices:
CURRENT_ACTIVE_GROUP: active group is always preferred;
GROUP_NUMBER_INCREASING: the higher the group number the higher its priority;
GROUP_NUMBER_DECREASING: the lower the group number the higher its priority;
TIME_OF_ARRIVAL: priority ordered by decreasing waiting time (not yet implemented!).


Enum Constant Summary
CURRENT_ACTIVE_GROUP
           
GROUP_NUMBER_DECREASING
           
GROUP_NUMBER_INCREASING
           
TIME_OF_ARRIVAL
           
 
Method Summary
static GroupMutex.Priority valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GroupMutex.Priority[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CURRENT_ACTIVE_GROUP

public static final GroupMutex.Priority CURRENT_ACTIVE_GROUP

GROUP_NUMBER_INCREASING

public static final GroupMutex.Priority GROUP_NUMBER_INCREASING

GROUP_NUMBER_DECREASING

public static final GroupMutex.Priority GROUP_NUMBER_DECREASING

TIME_OF_ARRIVAL

public static final GroupMutex.Priority TIME_OF_ARRIVAL
Method Detail

values

public static GroupMutex.Priority[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GroupMutex.Priority c : GroupMutex.Priority.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GroupMutex.Priority valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null