public class WorkerSchedulePlan extends java.lang.Object implements java.lang.Comparable<WorkerSchedulePlan>
Constructor and Description |
---|
WorkerSchedulePlan(int id,
java.util.Set<TaskInstancePlan> instances,
Resource requiredResource)
Create a schedule plan for a worker
|
WorkerSchedulePlan(int id,
java.util.Set<TaskInstancePlan> taskInstances,
Resource requiredResource,
Resource scheduledResource)
Create a worker schedule plan
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(WorkerSchedulePlan o) |
boolean |
equals(java.lang.Object o) |
int |
getContainerId() |
Resource |
getRequiredResource() |
java.util.Optional<Resource> |
getScheduledResource() |
java.util.Set<TaskInstancePlan> |
getTaskInstances() |
int |
hashCode() |
public WorkerSchedulePlan(int id, java.util.Set<TaskInstancePlan> instances, Resource requiredResource)
id
- worker idinstances
- instances assigned to the workerrequiredResource
- resourcespublic WorkerSchedulePlan(int id, java.util.Set<TaskInstancePlan> taskInstances, Resource requiredResource, Resource scheduledResource)
id
- worker idtaskInstances
- instancesrequiredResource
- required resourcesscheduledResource
- scheduled resourcepublic int getContainerId()
public java.util.Set<TaskInstancePlan> getTaskInstances()
public Resource getRequiredResource()
public java.util.Optional<Resource> getScheduledResource()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(WorkerSchedulePlan o)
compareTo
in interface java.lang.Comparable<WorkerSchedulePlan>