From c55fe15fc36ad01b93f4efe85ff85911d041d5d7 Mon Sep 17 00:00:00 2001 From: Nathan Harmata Date: Tue, 2 Aug 2016 18:13:28 +0000 Subject: Delete NodeEntryField since it's now superfluous in the presence of the new QueryableGraph.Reason which conveys more information. Add a few more Reason enum values to make this refactor benign. -- MOS_MIGRATED_REVID=129118462 --- .../com/google/devtools/build/skyframe/DeterministicHelper.java | 8 +++----- .../devtools/build/skyframe/DeterministicInMemoryGraph.java | 2 +- .../com/google/devtools/build/skyframe/GraphConcurrencyTest.java | 3 +-- .../java/com/google/devtools/build/skyframe/NotifyingHelper.java | 8 +++----- .../google/devtools/build/skyframe/NotifyingInMemoryGraph.java | 2 +- 5 files changed, 9 insertions(+), 14 deletions(-) (limited to 'src/test/java/com/google/devtools/build/skyframe') diff --git a/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java b/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java index fe7c76fc91..e27cab4790 100644 --- a/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java +++ b/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java @@ -16,7 +16,6 @@ package com.google.devtools.build.skyframe; import com.google.common.collect.Iterables; import java.util.Collection; import java.util.Comparator; -import java.util.EnumSet; import java.util.Map; import java.util.Set; import java.util.TreeMap; @@ -116,12 +115,11 @@ public class DeterministicHelper extends NotifyingHelper { } @Override - public Map getBatchWithFieldHints( + public Map getBatch( @Nullable SkyKey requestor, Reason reason, - Iterable keys, - EnumSet fields) { - return makeDeterministic(super.getBatchWithFieldHints(requestor, reason, keys, fields)); + Iterable keys) { + return makeDeterministic(super.getBatch(requestor, reason, keys)); } } diff --git a/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java b/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java index 0cbc91ce32..fda230ead1 100644 --- a/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java +++ b/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java @@ -28,7 +28,7 @@ class DeterministicInMemoryGraph extends DeterministicHelper.DeterministicProces @Override public Map getBatchForInvalidation(Iterable keys) { - return getBatchWithFieldHints(null, Reason.INVALIDATION, keys, NodeEntryField.ALL_FIELDS); + return getBatch(null, Reason.INVALIDATION, keys); } @Override diff --git a/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java b/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java index df6f99ca22..ca011cbb31 100644 --- a/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java +++ b/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java @@ -380,8 +380,7 @@ public abstract class GraphConcurrencyTest { } catch (InterruptedException e) { throw new AssertionError(e); } - Map batchMap = - graph.getBatchWithFieldHints(null, Reason.OTHER, batch, NodeEntryField.NO_FIELDS); + Map batchMap = graph.getBatch(null, Reason.OTHER, batch); getBatchCountDownLatch.countDown(); assertThat(batchMap).hasSize(batch.size()); for (NodeEntry entry : batchMap.values()) { diff --git a/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java b/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java index af0049b52b..655b7f8276 100644 --- a/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java +++ b/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java @@ -19,7 +19,6 @@ import com.google.common.collect.Maps; import com.google.common.collect.Maps.EntryTransformer; import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe; import com.google.devtools.build.lib.util.GroupedList; -import java.util.EnumSet; import java.util.Map; import java.util.Set; @@ -126,13 +125,12 @@ public class NotifyingHelper { } @Override - public Map getBatchWithFieldHints( + public Map getBatch( @Nullable SkyKey requestor, Reason reason, - Iterable keys, - EnumSet fields) { + Iterable keys) { return Maps.transformEntries( - delegate.getBatchWithFieldHints(requestor, reason, keys, fields), + delegate.getBatch(requestor, reason, keys), notifyingHelper.wrapEntry); } diff --git a/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java b/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java index d6d3ab04c7..1aa32cebdb 100644 --- a/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java +++ b/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java @@ -24,7 +24,7 @@ class NotifyingInMemoryGraph extends NotifyingHelper.NotifyingProcessableGraph @Override public Map getBatchForInvalidation(Iterable keys) { - return getBatchWithFieldHints(null, Reason.INVALIDATION, keys, NodeEntryField.ALL_FIELDS); + return getBatch(null, Reason.INVALIDATION, keys); } @Override -- cgit v1.2.3