public class DefaultPlanManager extends java.lang.Object implements PlanManager
PlanManager.
Encapsulates the plan and a strategy for executing that plan.| Modifier and Type | Method and Description |
|---|---|
static DefaultPlanManager |
createInterrupted(Plan plan)
Creates a new plan manager for the provided
Plan, which will be set to an interrupted state. |
static DefaultPlanManager |
createProceeding(Plan plan)
Creates a new plan manager for the provided
Plan, which will not be set to an interrupted state. |
java.util.Collection<? extends Step> |
getCandidates(java.util.Collection<PodInstanceRequirement> dirtyAssets)
Determines the next
Steps that should be considered for scheduling. |
java.util.Set<PodInstanceRequirement> |
getDirtyAssets()
Returns a
Set of assets that are dirty, i.e. |
Plan |
getPlan() |
void |
update(Protos.TaskStatus status)
Notifies constituent elements of TaskStatus updates.
|
public static DefaultPlanManager createProceeding(Plan plan)
Plan, which will not be set to an interrupted state.public static DefaultPlanManager createInterrupted(Plan plan)
Plan, which will be set to an interrupted state.public Plan getPlan()
getPlan in interface PlanManagerpublic java.util.Collection<? extends Step> getCandidates(java.util.Collection<PodInstanceRequirement> dirtyAssets)
PlanManagerSteps that should be considered for scheduling. Steps that are being selected
by other PlanManagers are provided as dirtyAssets as a hint to this PlanManager to assist
with scheduling.getCandidates in interface PlanManagerdirtyAssets - Other Steps/assets that are already claimed for scheduling elsewhereSteps that can be scheduled or an empty Collection when there is no Step to
schedule, which may happen if for example all incomplete Steps are already being worked on by
other PlanManagerspublic void update(Protos.TaskStatus status)
PlanManagerupdate in interface PlanManagerstatus - A TaskStatus from Mesos.public java.util.Set<PodInstanceRequirement> getDirtyAssets()
PlanManagerSet of assets that are dirty, i.e. being worked upon by the Plan that this
PlanManager is working on.getDirtyAssets in interface PlanManagerSet containing assets that are dirty