aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe
diff options
context:
space:
mode:
authorGravatar shahan <shahan@google.com>2018-07-24 12:58:45 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-24 13:00:06 -0700
commit168e7c9b86603f4ccfd372b3de8ac07b2eb6a759 (patch)
treefa7324cd6f29f8151565297573d8062097a372dd /src/main/java/com/google/devtools/build/skyframe
parent4c9149d558161e7d3e363fb697f5852bc5742a36 (diff)
Configured targets register created source artifacts with Skyframe.
PiperOrigin-RevId: 205876673
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe')
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/InterruptibleIOLongSupplier.java21
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/TransitiveVersionTable.java30
2 files changed, 51 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/InterruptibleIOLongSupplier.java b/src/main/java/com/google/devtools/build/skyframe/InterruptibleIOLongSupplier.java
new file mode 100644
index 0000000000..271f7b2f95
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/skyframe/InterruptibleIOLongSupplier.java
@@ -0,0 +1,21 @@
+// Copyright 2018 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;
+
+import java.io.IOException;
+
+/** Wraps a deferred computation that returns a long and throws the noted exceptions. */
+public interface InterruptibleIOLongSupplier {
+ long getLong() throws InterruptedException, IOException;
+}
diff --git a/src/main/java/com/google/devtools/build/skyframe/TransitiveVersionTable.java b/src/main/java/com/google/devtools/build/skyframe/TransitiveVersionTable.java
new file mode 100644
index 0000000000..210cff45b8
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/skyframe/TransitiveVersionTable.java
@@ -0,0 +1,30 @@
+// Copyright 2018 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;
+
+import java.io.IOException;
+
+/** Readable view of transitive version information. */
+public interface TransitiveVersionTable {
+
+ VersionAggregator get(SkyKey key);
+
+ /** Encapsulates transitive version information. */
+ interface VersionAggregator {
+ /** @return the maximum transitive source version or -1 if no sources were found */
+ long getMaxTransitiveVersion(
+ long baselineVersion, InterruptibleIOLongSupplier deferredMaxDepVersion)
+ throws InterruptedException, IOException;
+ }
+}