com.sun.sgs.kernel
Enum Priority

java.lang.Object
  extended by java.lang.Enum<Priority>
      extended by com.sun.sgs.kernel.Priority
All Implemented Interfaces:
Serializable, Comparable<Priority>

public enum Priority
extends Enum<Priority>

The priority descriptions for the system.


Enum Constant Summary
HIGH
          The highest priority for tasks.
LOW
          The lowest priority for tasks.
MEDIUM
          The default priority for tasks.
MEDIUM_HIGH
          A medium high priority for tasks.
MEDIUM_LOW
          A medium low priority for tasks.
 
Method Summary
static Priority getDefaultPriority()
          Returns the default Priority used by the system.
 int getValue()
          Returns the numeric value that backs this priority.
abstract  Priority higher()
          Returns the priority that is higher than this priority, or this priority if this priority is the highest priority defined.
abstract  Priority lower()
          Returns the priority that is lower than this priority, or this priority if this priority is the lowest priority defined.
static Priority valueOf(String name)
          Returns the enum constant of this type with the specified name.
static 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
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HIGH

public static final Priority HIGH
The highest priority for tasks.


MEDIUM_HIGH

public static final Priority MEDIUM_HIGH
A medium high priority for tasks.


MEDIUM

public static final Priority MEDIUM
The default priority for tasks.


MEDIUM_LOW

public static final Priority MEDIUM_LOW
A medium low priority for tasks.


LOW

public static final Priority LOW
The lowest priority for tasks.

Method Detail

values

public static 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 (Priority c : 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 Priority valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getValue

public int getValue()
Returns the numeric value that backs this priority. These values are only important in deciding the relative distance between priorities.

Returns:
the numeric value of this priority

getDefaultPriority

public static Priority getDefaultPriority()
Returns the default Priority used by the system.

Returns:
the default Priority

higher

public abstract Priority higher()
Returns the priority that is higher than this priority, or this priority if this priority is the highest priority defined.

Returns:
the priority higher than this priority, or this priority if this is the highest priority

lower

public abstract Priority lower()
Returns the priority that is lower than this priority, or this priority if this priority is the lowest priority defined.

Returns:
the priority lower than this priority, or this priority if this is the lowest priority

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved