pt.ua.concurrent
Enum RWEx.Priority

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

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

Locking priority choices:
WRITER: priority to writers (a waiting writer prevents new readers from getting the lock);
READERS: priority to readers (a waiting reader prevents new writers from getting the lock);
TIME_OF_ARRIVAL: priority ordered by decreasing waiting time (not yet implemented!).


Enum Constant Summary
READERS
           
TIME_OF_ARRIVAL
           
WRITER
           
 
Method Summary
static RWEx.Priority valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static RWEx.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

WRITER

public static final RWEx.Priority WRITER

READERS

public static final RWEx.Priority READERS

TIME_OF_ARRIVAL

public static final RWEx.Priority TIME_OF_ARRIVAL
Method Detail

values

public static RWEx.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 (RWEx.Priority c : RWEx.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 RWEx.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