Class CompiledQueryProfile
java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.search.query.profile.compiled.CompiledQueryProfile
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.component.Deconstructable
,Cloneable
,Comparable<com.yahoo.component.Component>
public class CompiledQueryProfile
extends com.yahoo.component.AbstractComponent
implements Cloneable
A query profile in a state where it is optimized for fast lookups.
- Author:
- bratseth
-
Field Summary
Fields inherited from class com.yahoo.component.AbstractComponent
isDeconstructable
-
Constructor Summary
ConstructorDescriptionCompiledQueryProfile
(com.yahoo.component.ComponentId id, QueryProfileType type, DimensionalMap<ValueWithSource> entries, DimensionalMap<QueryProfileType> types, DimensionalMap<Object> references, DimensionalMap<Object> unoverridables, CompiledQueryProfileRegistry registry) Creates a new query profile from an id. -
Method Summary
Modifier and TypeMethodDescriptionclone()
final Object
get
(com.yahoo.processing.request.CompoundName name, Map<String, String> context, com.yahoo.processing.request.Properties substitution) final Object
final Object
final Object
final DimensionalMap<ValueWithSource>
Returns all the entries from the profileReturns the references reachable from this, or an empty map (never null) if noneReturns the registry this belongs to, or null if none (in which case runtime profile reference assignment won't work)getType()
Returns the type of this or null if it has no typefinal QueryProfileType
Returns the type of a given prefix reachable from this profile, or null if nonegetTypes()
Returns the types reachable from this, or an empty map (never null) if nonefinal boolean
isOverridable
(com.yahoo.processing.request.CompoundName name, Map<String, String> context) Returns whether or not the given field name can be overridden at runtime.listValues
(com.yahoo.processing.request.CompoundName prefix) Return all objects that start with the given prefix path using no context.listValues
(com.yahoo.processing.request.CompoundName prefix, Map<String, String> context) Return all objects that start with the given prefix path.listValues
(com.yahoo.processing.request.CompoundName prefix, Map<String, String> context, com.yahoo.processing.request.Properties substitution) Adds all objects that start with the given path prefix to the given value map.listValues
(String prefix) listValues
(String prefix, Map<String, String> context) Return all objects that start with the given prefix path.listValuesWithSources
(com.yahoo.processing.request.CompoundName prefix, Map<String, String> context, com.yahoo.processing.request.Properties substitution) toString()
Methods inherited from class com.yahoo.component.AbstractComponent
compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable
-
Constructor Details
-
CompiledQueryProfile
public CompiledQueryProfile(com.yahoo.component.ComponentId id, QueryProfileType type, DimensionalMap<ValueWithSource> entries, DimensionalMap<QueryProfileType> types, DimensionalMap<Object> references, DimensionalMap<Object> unoverridables, CompiledQueryProfileRegistry registry) Creates a new query profile from an id.
-
-
Method Details
-
getRegistry
Returns the registry this belongs to, or null if none (in which case runtime profile reference assignment won't work) -
getType
Returns the type of this or null if it has no type -
isOverridable
public final boolean isOverridable(com.yahoo.processing.request.CompoundName name, Map<String, String> context) Returns whether or not the given field name can be overridden at runtime. Attempts to override values which cannot be overridden will not fail but be ignored. Default: true.- Parameters:
name
- the name of the field to checkcontext
- the context in which to check, or null if none
-
getType
public final QueryProfileType getType(com.yahoo.processing.request.CompoundName name, Map<String, String> context) Returns the type of a given prefix reachable from this profile, or null if none -
getTypes
Returns the types reachable from this, or an empty map (never null) if none -
getReferences
Returns the references reachable from this, or an empty map (never null) if none -
listValues
Return all objects that start with the given prefix path using no context. Use "" to list all.For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}
-
listValues
-
listValues
Return all objects that start with the given prefix path. Use "" to list all.For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}
-
listValues
public final Map<String,Object> listValues(com.yahoo.processing.request.CompoundName prefix, Map<String, String> context) Return all objects that start with the given prefix path. Use "" to list all.For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}
-
listValues
public Map<String,Object> listValues(com.yahoo.processing.request.CompoundName prefix, Map<String, String> context, com.yahoo.processing.request.Properties substitution) Adds all objects that start with the given path prefix to the given value map. Use "" to list all.For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}
-
listValuesWithSources
-
get
-
get
-
get
-
get
-
getEntries
Returns all the entries from the profile -
clone
- Overrides:
clone
in classcom.yahoo.component.AbstractComponent
-
toString
- Overrides:
toString
in classcom.yahoo.component.AbstractComponent
-