|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.resourcesharing.ResourceRegistryChild
public class ResourceRegistryChild
| Constructor Summary | |
|---|---|
ResourceRegistryChild(int isolateId,
com.sun.spot.resourcesharing.IResourceRegistryMaster masterRegistry)
|
|
| Method Summary | |
|---|---|
IResourceHandle |
adjustLock(IResourceHandle handle,
ResourceSharingScheme newScheme)
Attempt to change the ResourceSharingScheme associated with the handle. |
IResourceHandle |
getResource(String resourceName,
ResourceSharingScheme scheme)
Request access to a resource. |
String[] |
getResourceNames()
|
void |
register(String resourceName,
IResource resource)
Inform the registry of a resource that is available for sharing. |
void |
unlock(IResourceHandle handle)
Notify the registry that that access to the resource, as defined by the specified handle, is no longer required. |
void |
unlockAllResourcesHeldByIsolate(int isolateId)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceRegistryChild(int isolateId,
com.sun.spot.resourcesharing.IResourceRegistryMaster masterRegistry)
| Method Detail |
|---|
public IResourceHandle getResource(String resourceName,
ResourceSharingScheme scheme)
throws ResourceUnavailableException
IResourceRegistry
getResource in interface IResourceRegistryresourceName - The name of the resource.scheme - The scheme that defines the intended or required usage.
ResourceUnavailableException - If the resource is currently unavailablepublic String[] getResourceNames()
getResourceNames in interface IResourceRegistry
public void register(String resourceName,
IResource resource)
throws ResourceSharingException
IResourceRegistry
register in interface IResourceRegistryresourceName - The name of the resourceresource - The resource object
ResourceSharingException - If the resource has already been registered.
public void unlock(IResourceHandle handle)
throws ResourceSharingException
IResourceRegistry
unlock in interface IResourceRegistryhandle - The handle being unlocked
ResourceSharingExceptionpublic void unlockAllResourcesHeldByIsolate(int isolateId)
public IResourceHandle adjustLock(IResourceHandle handle,
ResourceSharingScheme newScheme)
throws ResourceUnavailableException
IResourceRegistryResourceSharingScheme associated with the handle. Returns a
handle that has the new lock status (which might or might not be the same handle passed
as the input parameter). If the existence of other locks make the change impossible,
throw ResourceUnavailableException.
adjustLock in interface IResourceRegistryhandle - The handle to adjust the lock ofnewScheme - The required resource sharing scheme
ResourceUnavailableException
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||