public synchronized void add(T node, int load) {
        if ( ! nodes.hasNode(node)) {
            NodeFactor<T>[] oldNodes = nodes.nodes;
            @SuppressWarnings("unchecked")
            NodeFactor<T>[] newNodes = (NodeFactor<T>[]) new NodeFactor[oldNodes.length + 1];
            System.arraycopy(oldNodes, 0, newNodes, 0, oldNodes.length);
            newNodes[newNodes.length - 1] = new NodeFactor<>(node, load);

            //Atomic switch due to volatile
            nodes = new NodeList<>(newNodes);
        }
    }
Adds a code with a load factor.
The load factor is relative to the load of the other added nodes
and determines how often this node will be selected compared
to the other nodes
container-search/src/main/java/com/yahoo/search/cluster/Hasher.java