use of com.mesosphere.sdk.scheduler.decommission.DecommissionPlanFactory in project dcos-commons by mesosphere.
the class SchedulerBuilder method getDecommissionPlanManager.
private static Optional<PlanManager> getDecommissionPlanManager(ServiceSpec serviceSpec, StateStore stateStore) {
DecommissionPlanFactory decommissionPlanFactory = new DecommissionPlanFactory(serviceSpec, stateStore);
Optional<Plan> decommissionPlan = decommissionPlanFactory.getPlan();
if (decommissionPlan.isPresent()) {
return Optional.of(new DecommissionPlanManager(decommissionPlan.get(), decommissionPlanFactory.getTasksToDecommission()));
}
return Optional.empty();
}
Aggregations