All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.vespa.hosted.provision.os.CompositeOsUpgrader Maven / Gradle / Ivy

There is a newer version: 8.458.13
Show newest version
package com.yahoo.vespa.hosted.provision.os;

import com.yahoo.config.provision.NodeType;

import java.util.List;

/**
 * An implementation of {@link OsUpgrader} that delegates calls to multiple implementations.
 *
 * @author mpolden
 */
public record CompositeOsUpgrader(List upgraders) implements OsUpgrader {

    public CompositeOsUpgrader(List upgraders) {
        this.upgraders = List.copyOf(upgraders);
    }

    @Override
    public void upgradeTo(OsVersionTarget target) {
        upgraders.forEach(upgrader -> upgrader.upgradeTo(target));
    }

    @Override
    public void disableUpgrade(NodeType type) {
        upgraders.forEach(upgrader -> upgrader.disableUpgrade(type));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy