use of com.mesosphere.sdk.scheduler.decommission.DecommissionRecorder in project dcos-commons by mesosphere.
the class DefaultScheduler method getOfferAccepter.
private static OfferAccepter getOfferAccepter(StateStore stateStore, ServiceSpec serviceSpec, PlanCoordinator planCoordinator) {
List<OperationRecorder> recorders = new ArrayList<>();
recorders.add(new PersistentLaunchRecorder(stateStore, serviceSpec));
Optional<DecommissionPlanManager> decommissionManager = getDecomissionManager(planCoordinator);
if (decommissionManager.isPresent()) {
Collection<Step> steps = decommissionManager.get().getPlan().getChildren().stream().flatMap(phase -> phase.getChildren().stream()).collect(Collectors.toList());
recorders.add(new DecommissionRecorder(stateStore, steps));
}
return new OfferAccepter(recorders);
}
Aggregations