abstract class PrefixQueryProfileVisitor extends QueryProfileVisitor
Modifier and Type | Field and Description |
---|---|
protected com.yahoo.processing.request.CompoundName |
currentPrefix
The current prefix, relative to prefix.
|
private com.yahoo.processing.request.CompoundName |
prefix
Only call onValue/onQueryProfile for nodes having this prefix
|
private int |
prefixComponentIndex |
Constructor and Description |
---|
PrefixQueryProfileVisitor(com.yahoo.processing.request.CompoundName prefix) |
Modifier and Type | Method and Description |
---|---|
boolean |
enter(String name)
Called when a new nested profile in the graph is entered.
|
String |
getLocalKey()
Returns the correct prefix component if we are still going down the prefix path,
or null to get all if we are inside the prefix
|
void |
leave(String name)
Called when the last
entered nested profile is left. |
void |
onQueryProfile(QueryProfile profile,
DimensionBinding binding,
QueryProfile owner)
Called when a query profile is encountered.
|
protected abstract void |
onQueryProfileInsidePrefix(QueryProfile profile,
DimensionBinding binding,
QueryProfile owner) |
acceptValue, isDone, onValue, visitInherited
private final com.yahoo.processing.request.CompoundName prefix
protected com.yahoo.processing.request.CompoundName currentPrefix
private int prefixComponentIndex
public PrefixQueryProfileVisitor(com.yahoo.processing.request.CompoundName prefix)
public final void onQueryProfile(QueryProfile profile, DimensionBinding binding, QueryProfile owner)
QueryProfileVisitor
onQueryProfile
in class QueryProfileVisitor
profile
- the query profile reference encounteredbinding
- the binding this holds forowner
- the profile making this reference, or null only when profile is the root profileprotected abstract void onQueryProfileInsidePrefix(QueryProfile profile, DimensionBinding binding, QueryProfile owner)
public final boolean enter(String name)
QueryProfileVisitor
QueryProfileVisitor.leave(String)
call will happen
later.enter
in class QueryProfileVisitor
name
- the name this profile is nested as, or the empty string if we are entering the root profilepublic final void leave(String name)
QueryProfileVisitor
entered
nested profile is left.
That is: One leave call is made for each enter call which returns true,
but due to nesting those calls are not necessarily alternating.
This default implementation does nothing.leave
in class QueryProfileVisitor
public String getLocalKey()
getLocalKey
in class QueryProfileVisitor
Copyright © 2018. All rights reserved.