org.ocap.resource
Interface ResourcePriority


public interface ResourcePriority

An enumeration of priority values that describe the importance of a resource reservation to an application. The resource priority is intended to be used by the installed ResourceContentionHandler to aid in resource contention resolution.

The resource priority may be set on an instance of ResourceContext using the setResourcePriority() method. This priority applies to any resource reservation operation performed within the context. The resource priority of a reservation or reservation request is made accessible via the ResourceUsage.getResourcePriority() method.

Valid resource priorities are between 0 (zero) and Integer.MAX_VALUE. The following table outlines the priority ranges and their intended use.

Value Range Description
0x00000000-0x0000FFFF Application range including the unknown, low, medium, and high priorities as defined by this interface
0x00010000-0x3FFFFFFF MSO private for network-specific use.
0x40000000-0x7FFFFFFF OCAP reserved for future use.

The ultimate meaning and interpretation of the priority is implicitly assigned by the ResourceContentionHandler, most likely in conjunction with other attributes of a resource reservation request. There is no requirement that a contention handler be absolute in its interpretation of priorities, including the relative priorities of specific values. This is especially true for the OCAP-reserved and MSO-private ranges where no implicit ordering should be considered to apply by applications.

Author:
Aaron Kamienski
See Also:
ResourceContext, ResourceContext.setResourcePriority(int)

Field Summary
static int PRIORITY_HIGH
          A constant representing a resource priority of high.
static int PRIORITY_LOW
          A constant representing a resource priority of low.
static int PRIORITY_MEDIUM
          A constant representing a resource priority of medium.
static int PRIORITY_MSO_FIRST
          A constant representing the first MSO-defined resource priority value.
static int PRIORITY_MSO_LAST
          A constant representing the last MSO-defined resource priority value.
static int PRIORITY_UNKNOWN
          A constant representing the default resource priority.
 

Field Detail

PRIORITY_UNKNOWN

static final int PRIORITY_UNKNOWN
A constant representing the default resource priority. This is the priority returned by ResourceUsage.getResourcePriority() if no ResourceContext is applicable when a resource reservation is attempted or no resource priority was set.

See Also:
Constant Field Values

PRIORITY_LOW

static final int PRIORITY_LOW
A constant representing a resource priority of low. Low priority indicates that a resource is needed for a non-essential background task. Applications SHOULD specify PRIORITY_LOW when the inability to reserve a resource does not impact the immediate user experience and the application can perform the operation at a later time.

See Also:
Constant Field Values

PRIORITY_MEDIUM

static final int PRIORITY_MEDIUM
A constant representing a resource priority of medium. Medium priority indicates that a resource is needed for a non-essential user-directed task. Applications SHOULD specify PRIORITY_MEDIUM when the inability to reserve a resource only minimally affects the user experience, but where the majority of the consumer-selected function remains available.

See Also:
Constant Field Values

PRIORITY_HIGH

static final int PRIORITY_HIGH
A constant representing a resource priority of high. High priority indicates that a resource is needed for an essential user-directed task. Applications SHOULD specify PRIORITY_HIGH when the inability to reserve a resource will adversely affect the user experience, potentially to the point that the application cannot continue to provide for a consumer-selected function.

See Also:
Constant Field Values

PRIORITY_MSO_FIRST

static final int PRIORITY_MSO_FIRST
A constant representing the first MSO-defined resource priority value. The usage and meaning of all priority values between PRIORITY_MSO_FIRST and PRIORITY_MSO_LAST are network-specific.

See Also:
PRIORITY_MSO_LAST, Constant Field Values

PRIORITY_MSO_LAST

static final int PRIORITY_MSO_LAST
A constant representing the last MSO-defined resource priority value. The usage and meaning of all priority values between PRIORITY_MSO_FIRST and PRIORITY_MSO_LAST are network-specific.

See Also:
PRIORITY_MSO_FIRST, Constant Field Values