aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/profile/AllUnoverridableQueryProfileVisitor.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/AllUnoverridableQueryProfileVisitor.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/AllUnoverridableQueryProfileVisitor.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/AllUnoverridableQueryProfileVisitor.java b/container-search/src/main/java/com/yahoo/search/query/profile/AllUnoverridableQueryProfileVisitor.java
deleted file mode 100644
index 4bae6823500..00000000000
--- a/container-search/src/main/java/com/yahoo/search/query/profile/AllUnoverridableQueryProfileVisitor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.search.query.profile;
-
-import com.yahoo.processing.request.CompoundName;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author bratseth
- */
-final class AllUnoverridableQueryProfileVisitor extends PrefixQueryProfileVisitor {
-
- /** A map of query profile types */
- private Set<CompoundName> unoverridables = new HashSet<>();
-
- public AllUnoverridableQueryProfileVisitor(CompoundName prefix) {
- super(prefix);
- }
-
- @Override
- public void onValue(String name, Object value,
- DimensionBinding binding,
- QueryProfile owner,
- DimensionValues variant) {
- addUnoverridable(name, currentPrefix.append(name), binding, owner);
- }
-
- @Override
- public void onQueryProfileInsidePrefix(QueryProfile profile,
- DimensionBinding binding,
- QueryProfile owner,
- DimensionValues variant) {
- addUnoverridable(currentPrefix.last(), currentPrefix, binding, owner);
- }
-
- private void addUnoverridable(String localName,
- CompoundName fullName,
- DimensionBinding binding,
- QueryProfile owner) {
- if (owner == null) return;
-
- Boolean isOverridable = owner.isLocalOverridable(localName, binding);
- if (isOverridable != null && ! isOverridable)
- unoverridables.add(fullName);
- }
-
- /** Returns the values resulting from this visiting */
- public Set<CompoundName> getResult() { return unoverridables; }
-
- /** Returns false - we are not done until we have seen all */
- public boolean isDone() { return false; }
-
-}