aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
diff options
context:
space:
mode:
authorGravatar kush <kush@google.com>2017-07-18 01:26:22 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-07-18 09:49:17 +0200
commit6e72f78e1c2e573787ec862e671f3b3b4c33dc96 (patch)
treecfeac6f905aaac1616bc493c4a6b2941337f3160 /src/main/java/com/google/devtools
parent7f6d3a13b63b702a6c56010610c3f0018490dfec (diff)
Small changes to skyframe package.
PiperOrigin-RevId: 162288376
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/ConstantVersion.java26
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/InMemoryGraph.java2
2 files changed, 27 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/ConstantVersion.java b/src/main/java/com/google/devtools/build/skyframe/ConstantVersion.java
new file mode 100644
index 0000000000..792f167a6f
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/skyframe/ConstantVersion.java
@@ -0,0 +1,26 @@
+// Copyright 2017 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.devtools.build.skyframe;
+
+/** Use when only a single evaluation of the graph with a single constant version is expected. */
+public class ConstantVersion implements Version {
+ public static final ConstantVersion INSTANCE = new ConstantVersion();
+
+ private ConstantVersion() {}
+
+ @Override
+ public boolean atMost(Version other) {
+ return this.equals(other);
+ }
+}
diff --git a/src/main/java/com/google/devtools/build/skyframe/InMemoryGraph.java b/src/main/java/com/google/devtools/build/skyframe/InMemoryGraph.java
index 82ddb17f76..267ae7805b 100644
--- a/src/main/java/com/google/devtools/build/skyframe/InMemoryGraph.java
+++ b/src/main/java/com/google/devtools/build/skyframe/InMemoryGraph.java
@@ -17,7 +17,7 @@ import java.util.Map;
import javax.annotation.Nullable;
/** {@link ProcessableGraph} that exposes the contents of the entire graph. */
-interface InMemoryGraph extends ProcessableGraph {
+public interface InMemoryGraph extends ProcessableGraph {
@Override
Map<SkyKey, ? extends NodeEntry> createIfAbsentBatch(
@Nullable SkyKey requestor, Reason reason, Iterable<SkyKey> keys);