Search in sources :

Example 1 with DecommissionPlanFactory

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();
}
Also used : DecommissionPlanFactory(com.mesosphere.sdk.scheduler.decommission.DecommissionPlanFactory) RawPlan(com.mesosphere.sdk.specification.yaml.RawPlan)

Aggregations

DecommissionPlanFactory (com.mesosphere.sdk.scheduler.decommission.DecommissionPlanFactory)1 RawPlan (com.mesosphere.sdk.specification.yaml.RawPlan)1