|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 IResourceRegistry
resourceName
- 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 IResourceRegistry
resourceName
- 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 IResourceRegistry
handle
- The handle being unlocked
ResourceSharingException
public void unlockAllResourcesHeldByIsolate(int isolateId)
public IResourceHandle adjustLock(IResourceHandle handle, ResourceSharingScheme newScheme) throws ResourceUnavailableException
IResourceRegistry
ResourceSharingScheme
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 IResourceRegistry
handle
- The handle to adjust the lock ofnewScheme
- The required resource sharing scheme
ResourceUnavailableException
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |