diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-10-30 16:31:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-30 16:31:38 +0200 |
commit | 1da6754a571bb380cc32d77b7aa76fe5ebaa24b0 (patch) | |
tree | 127022f9f9fe999f2db5666312d19d2be39ece82 /container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java | |
parent | d8970d73872e5386f36aaa73e2dc6b0e881069bf (diff) | |
parent | c702f4874ea9f0cb263a3e54471eef5bb1c71d8c (diff) |
Merge pull request #19792 from vespa-engine/bratseth/stable-query-profile-idsv7.492.78
Bratseth/stable query profile ids
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java b/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java index 58a1ae7ad14..201f246b30c 100644 --- a/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java +++ b/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.query.profile.types; +import com.yahoo.component.ComponentId; import com.yahoo.component.provider.ComponentRegistry; import com.yahoo.search.Query; import com.yahoo.search.query.profile.QueryProfileRegistry; @@ -12,6 +13,8 @@ import com.yahoo.search.query.profile.QueryProfileRegistry; */ public class QueryProfileTypeRegistry extends ComponentRegistry<QueryProfileType> { + private int nextAnonymousId = 0; + private final int nativeProfileCount; public QueryProfileTypeRegistry() { @@ -42,4 +45,8 @@ public class QueryProfileTypeRegistry extends ComponentRegistry<QueryProfileType return registry; } + public ComponentId createAnonymousId(String name) { + return ComponentId.newAnonymous(name + "_" + (nextAnonymousId++)); + } + } |