blob: a9c067d6fd258a2dbcdcbaeed513b82add4ed408 [file] [log] [blame]
Damien Martin-Guillerezf88f4d82015-09-25 13:56:55 +00001// Copyright 2014 The Bazel Authors. All rights reserved.
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01002//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14package com.google.devtools.build.skyframe;
15
Nathan Harmatae9552872015-04-01 21:53:06 +000016import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
17
Nathan Harmatac7e974a2015-10-02 22:07:35 +000018import java.util.Map;
19
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010020/**
21 * Interface between a single version of the graph and the evaluator. Supports mutation of that
22 * single version of the graph.
23 */
Nathan Harmatae9552872015-04-01 21:53:06 +000024@ThreadSafe
Janak Ramakrishnancc7712f2016-07-08 17:38:27 +000025interface EvaluableGraph extends QueryableGraph, DeletableGraph {
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010026 /**
Janak Ramakrishnan2553c842016-07-08 18:43:37 +000027 * Like {@link QueryableGraph#getBatchWithFieldHints}, except it creates a new node for each key
28 * not already present in the graph. Thus, the returned map will have an entry for each key in
29 * {@code keys}.
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010030 */
Nathan Harmatac7e974a2015-10-02 22:07:35 +000031 Map<SkyKey, NodeEntry> createIfAbsentBatch(Iterable<SkyKey> keys);
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010032}