SunSPOT API V5.0


com.sun.spot.resourcesharing
Class ResourceSharingScheme

java.lang.Object
  extended by com.sun.spot.resourcesharing.ResourceSharingScheme

public abstract class ResourceSharingScheme
extends Object

An enumerated type that defines the different sharing schemes for shared resources.


Field Summary
static ResourceSharingScheme EXCLUSIVE
          The requestor requires fully exclusive access to the resource.
static ResourceSharingScheme EXCLUSIVE_WRITE
          The requestor requires exclusive write access to the resource, but concurrent READ access is permitted.
static ResourceSharingScheme READ
          The requestor requires read access to the resource.
static ResourceSharingScheme WRITE
          The requestor requires write access to the resource, but concurrent READ and/or WRITE access is permitted.
 
Method Summary
static ResourceSharingScheme schemeMatching(ResourceSharingScheme scheme)
          Return the instance that matches the argument.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXCLUSIVE

public static final ResourceSharingScheme EXCLUSIVE
The requestor requires fully exclusive access to the resource. If granted no other request for access will succeed until the first requestor unlocks the resource.


EXCLUSIVE_WRITE

public static final ResourceSharingScheme EXCLUSIVE_WRITE
The requestor requires exclusive write access to the resource, but concurrent READ access is permitted. READ access for the requestor is implied.


WRITE

public static final ResourceSharingScheme WRITE
The requestor requires write access to the resource, but concurrent READ and/or WRITE access is permitted. READ access for the requestor is implied.


READ

public static final ResourceSharingScheme READ
The requestor requires read access to the resource.

Method Detail

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a string representation of the object.

schemeMatching

public static ResourceSharingScheme schemeMatching(ResourceSharingScheme scheme)
Return the instance that matches the argument. We need this to allow schemes to be passed between isolates

Parameters:
scheme - the scheme to be matched
Returns:
the matching scheme

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.