|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceContentionHandler2
A class implementing this interface decides which application(s) shall be allowed to reserve a resource.
An application which has been granted MonitorAppPermission("handler.resource")
MAY set an instance of this interface as the current resource contention
handler with the ResourceContentionManager
.
The resolveResourceContention(ResourceUsage[], ResourceUsage[])
method SHALL be invoked to decide how to resolve conflicts due to one ore more
enqueued requests (as MAY be enabled via ResourceContext.setRequestRetry(org.ocap.resource.RequestRetryCallback)
)
or simultaneous implicit reservations, and existing resource allocations.
The ResourceContentionHandler.resolveResourceContention(ResourceUsage,ResourceUsage[])
method SHALL be invoked to decide how to resolve conflicts due to a
single reservation request and existing resource allocations.
ResourceContentionManager
Method Summary | |
---|---|
ResourceUsage[] |
resolveResourceContention(ResourceUsage[] batchRequests,
ResourceUsage[] currentReservations)
This method notifies the ResourceContentionHandler that resource contentions have occurred between one or more applications and system modules, except the Emergency Alert System (EAS) module. |
Methods inherited from interface org.ocap.resource.ResourceContentionHandler |
---|
resolveResourceContention, resourceContentionWarning |
Method Detail |
---|
ResourceUsage[] resolveResourceContention(ResourceUsage[] batchRequests, ResourceUsage[] currentReservations)
Each entry in the batchRequests indicates a set of resources for which there is a current or outstanding reservation request by an application for a single activity. 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 these lists 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
or
resource 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.
batchRequests
- The set of resource usage objects containing the attributes
of the current outstanding resource request(s)currentReservations
- The set of resource usage objects that describe
current resource reservations which are in conflict with the batchRequests.
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 |