public interface ResourceTracker
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all state from the tracker.
|
Collection<ResourceRequirement> |
getAcquiredResources(JobID jobId)
Returns a collection of
ResourceRequirement s that describe which resources have been
assigned to a job. |
Map<JobID,Collection<ResourceRequirement>> |
getMissingResources()
Returns a collection of
ResourceRequirements that describe which resources the
corresponding job is missing. |
boolean |
isRequirementEmpty(JobID jobId)
Returns whether the
ResourceRequirement of the given job is empty. |
void |
notifyAcquiredResource(JobID jobId,
ResourceProfile resourceProfile)
Notifies the tracker about the acquisition of a resource with the given resource profile, for
the given job.
|
void |
notifyLostResource(JobID jobId,
ResourceProfile resourceProfile)
Notifies the tracker about the loss of a resource with the given resource profile, for the
given job.
|
void |
notifyResourceRequirements(JobID jobId,
Collection<ResourceRequirement> resourceRequirements)
Notifies the tracker about a new or updated
ResourceRequirements . |
void notifyResourceRequirements(JobID jobId, Collection<ResourceRequirement> resourceRequirements)
ResourceRequirements
.jobId
- the job that that the resource requirements belongs toresourceRequirements
- new resource requirementsvoid notifyAcquiredResource(JobID jobId, ResourceProfile resourceProfile)
jobId
- the job that acquired the resourceresourceProfile
- profile of the resourcevoid notifyLostResource(JobID jobId, ResourceProfile resourceProfile)
jobId
- the job that lost the resourceresourceProfile
- profile of the resourceMap<JobID,Collection<ResourceRequirement>> getMissingResources()
ResourceRequirements
that describe which resources the
corresponding job is missing.Collection<ResourceRequirement> getAcquiredResources(JobID jobId)
ResourceRequirement
s that describe which resources have been
assigned to a job.jobId
- job IDboolean isRequirementEmpty(JobID jobId)
ResourceRequirement
of the given job is empty.jobId
- job IDResourceRequirement
of the given job is emptyvoid clear()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.