|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceContentionHandler
A class implementing this interface decides which application shall be allowed to reserve a resource.
An application which has a MonitorAppPermission("handler.resource")
may have a class implementing this interface, and may set an instance of
it in the ResourceContentionManager.
The resolveResourceContention(org.ocap.resource.ResourceUsage, org.ocap.resource.ResourceUsage[])
method decides
the how to resolve resource conflicts between the new request and existing resource
allocations.
See the ResourceContentionManager
for the details.
Method Summary | |
---|---|
ResourceUsage[] |
resolveResourceContention(ResourceUsage newRequest,
ResourceUsage[] currentReservations)
This method notifies the ResourceContentionHandler that one to many resource contentions have occurred between one or more applications and system modules, except the Emergency Alert System (EAS) module. |
void |
resourceContentionWarning(ResourceUsage newRequest,
ResourceUsage[] currentReservations)
Warns the resource contention handler of an impending contention with a presenting ServiceContext (e.g., scheduled recording as defined by the OCAP DVR specification). |
Method Detail |
---|
ResourceUsage[] resolveResourceContention(ResourceUsage newRequest, ResourceUsage[] currentReservations)
This method notifies the ResourceContentionHandler that one to many resource contentions have occurred between two or more applications. Each entry in the currentReservations indicates a set of resources reserved by an application for a single activity such as a resource usage by a single service context. There may be multiple entries in this list from a single application. An entry may correspond to a current resource usage or resource reservations for a future activity.
A prioritized array of ResourceUsage
instances is returned.
The array is in priority order from highest to lowest indicating the
priority order to be followed by the implementation while resolving the
conflicts. When this method returns the implementation will iterate
through each entry in the array in the order of priority, awarding resources
as required by the activity represented by the resourceUsage. The
ResourceContentionHandler may use information such as Application Priority
to prioritize the array of ResourceUsages returned. When the value
returned is not null the ResourceContentionHandler MAY return an array
containing all of the ResourceUsage
objects passed to it,
or it MAY return a subset of those objects.
newRequest
- The resource usage object containing the attributes of
the resource request(s).currentReservations
- The set of resource usage objects that describe
current resource reservations which are in conflict with the newRequest.
A ResourceUsage
associated
with a current reservation MAY belong to an application that has been
destroyed. Use of the AppID
contained within such a
ResourceUsage
with any of the methods in org.dvb.application.AppsDatabase
MAY cause a failure status to be returned.
void resourceContentionWarning(ResourceUsage newRequest, ResourceUsage[] currentReservations)
ResourceContentionManager.setWarningPeriod(int)
method.
newRequest
- The resource usage object containing the attributes of
the resource[s] request.currentReservations
- The resource usage objects currently owned by applications
which are in conflict with the newRequest. A ResourceUsage associated
with a current reservation may belong to an application that has been
destroyed. Use of the AppID contained within such a ResourceUsage
with any of the methods in org.dvb.application.AppsDatabase
MAY cause a failure status to be returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |