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

com.yahoo.vespa.hosted.provision.node.NodeAcl Maven / Gradle / Ivy

There is a newer version: 8.458.13
Show newest version
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.node;

import com.google.common.collect.ImmutableSet;
import com.yahoo.vespa.hosted.provision.Node;

import java.util.Set;

/**
 * A node ACL. The ACL contains the node which the ACL is valid for,
 * a set of nodes and networks that the node should trust.
 *
 * @author mpolden
 */
public class NodeAcl {

    private final Node node;
    private final Set trustedNodes;
    private final Set trustedNetworks;
    private final Set trustedPorts;

    public NodeAcl(Node node, Set trustedNodes, Set trustedNetworks, Set trustedPorts) {
        this.node = node;
        this.trustedNodes = ImmutableSet.copyOf(trustedNodes);
        this.trustedNetworks = ImmutableSet.copyOf(trustedNetworks);
        this.trustedPorts = ImmutableSet.copyOf(trustedPorts);
    }

    public Node node() {
        return node;
    }

    public Set trustedNodes() {
        return trustedNodes;
    }

    public Set trustedNetworks() {
        return trustedNetworks;
    }

    public Set trustedPorts() {
        return trustedPorts;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy