Package hudson.slaves

Examples of hudson.slaves.NodeList


        nl.remove(n);
        setNodes(nl);
    }

    public void setNodes(List<? extends Node> nodes) throws IOException {
        this.slaves = new NodeList(nodes);
        updateComputerList();
        trimLabels();
        save();
    }
View Full Code Here


        TaskGraphBuilder g = new TaskGraphBuilder();
        Handle loadHudson = g.requires(EXTENSIONS_AUGMENTED).attains(JOB_LOADED).add("Loading global config", new Executable() {
            public void run(Reactor session) throws Exception {
                // JENKINS-8043: some slaves (eg. swarm slaves) are not saved into the config file
                // and will get overwritten when reloading. Make a backup copy now, and re-add them later
                NodeList oldSlaves = slaves;
               
                XmlFile cfg = getConfigFile();
                if (cfg.exists()) {
                    // reset some data that may not exist in the disk file
                    // so that we can take a proper compensation action later.
                    primaryView = null;
                    views.clear();

                    // load from disk
                    cfg.unmarshal(Jenkins.this);
                }

                // if we are loading old data that doesn't have this field
                if (slaves == null) slaves = new NodeList();

                clouds.setOwner(Jenkins.this);
                items.clear();

                // JENKINS-8043: re-add the slaves which were not saved into the config file
View Full Code Here

        for (Node n : nodes) {
            if (!names.add(n.getNodeName())) {
                throw new IllegalArgumentException(n.getNodeName() + " is defined more than once");
            }
        }
        this.slaves = new NodeList(nodes);
        updateComputerList();
        trimLabels();
        save();
    }
View Full Code Here

                    cfg.unmarshal(Hudson.this);
                }

                // if we are loading old data that doesn't have this field
                if (slaves == null) {
                    slaves = new NodeList();
                }

                clouds.setOwner(Hudson.this);
                items.clear();
            }
View Full Code Here

TOP

Related Classes of hudson.slaves.NodeList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.