org.ocap.dvr
Interface SharedResourceUsage

All Superinterfaces:
ResourceUsage, SharedResourceUsage

public interface SharedResourceUsage
extends SharedResourceUsage

This interface represents a group of resources where one or more resources are shared between multiple resource usages. For example, when a tuner is used for an ongoing recording and also for presenting a broadcast service in a service context, and if the tuner is in a resource contention, the tuner is considered shared between a RecordingResourceUsage and a ServiceContextResourceUsage. If there is a resource contention for a tuner, the shared usage of tuner is represented by a SharedResourceUsage where the getResourceUsages() method would return both ResourceUsage instances that share the tuner.

Because a SharedResourceUsage can contain multiple ResourceUsage instances where different applications reserved the resources, the value returned by the SharedResourceUsage.getAppID method is meaningless and SHALL be null. To determine AppID instances an application can peruse the ResourceUsage instances returned by the getResourceUsages method.


Method Summary
 ResourceUsage[] getResourceUsages()
          Gets the list of ResourceUsage instances that share the resources represented by this resource usage.
 ResourceUsage[] getResourceUsages(ResourceProxy resource)
          Gets the list of ResourceUsage instances that share a particular resource.
 
Methods inherited from interface org.ocap.resource.ResourceUsage
getAppID, getResource, getResourceNames
 

Method Detail

getResourceUsages

ResourceUsage[] getResourceUsages()
Gets the list of ResourceUsage instances that share the resources represented by this resource usage.

Specified by:
getResourceUsages in interface SharedResourceUsage
Returns:
An array of ResourceUsage instances that share one or more resources.

getResourceUsages

ResourceUsage[] getResourceUsages(ResourceProxy resource)
Gets the list of ResourceUsage instances that share a particular resource.

Specified by:
getResourceUsages in interface SharedResourceUsage
Parameters:
resource - The shared resource for which ResourceUsage instances should be returned.
Returns:
An array of ResourceUsage instances that share the specified resource.