Class ValueIndexLikeExpansionVisitor
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.ValueIndexLikeExpansionVisitor
-
- All Implemented Interfaces:
ExpansionVisitor<ValueIndexLikeExpansionVisitor.VisitorState>
,KeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Direct Known Subclasses:
PrimaryAccessExpansionVisitor
,ValueIndexExpansionVisitor
public abstract class ValueIndexLikeExpansionVisitor extends Object implements ExpansionVisitor<ValueIndexLikeExpansionVisitor.VisitorState>
Expansion visitor that implements the shared logic between primary scan data access and value index access.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValueIndexLikeExpansionVisitor.VisitorState
Class that holds the state necessary to expand both primary data access as well as value indexes.-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.temp.KeyExpressionVisitor
KeyExpressionVisitor.Result, KeyExpressionVisitor.State
-
-
Constructor Summary
Constructors Constructor Description ValueIndexLikeExpansionVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueIndexLikeExpansionVisitor.VisitorState
getCurrentState()
Method to return the (immutable) current state.ValueIndexLikeExpansionVisitor.VisitorState
pop()
Method to pop and return the top of the states stack.<T> T
pop(T t)
Functional pop to facilitate a more fluent way of interacting with the states.ValueIndexLikeExpansionVisitor
push(ValueIndexLikeExpansionVisitor.VisitorState newState)
GraphExpansion
visitExpression(EmptyKeyExpression emptyKeyExpression)
Specific method that is called onEmptyKeyExpression
s.GraphExpansion
visitExpression(FieldKeyExpression fieldKeyExpression)
Specific method that is called onFieldKeyExpression
s.GraphExpansion
visitExpression(KeyExpression keyExpression)
Specific implementation of the fall-back visitation method.GraphExpansion
visitExpression(KeyExpressionWithValue keyExpressionWithValue)
Specific method that is called onKeyExpressionWithValue
s.GraphExpansion
visitExpression(KeyWithValueExpression keyWithValueExpression)
Specific method that is called onKeyWithValueExpression
s.GraphExpansion
visitExpression(NestingKeyExpression nestingKeyExpression)
Specific method that is called onNestingKeyExpression
s.GraphExpansion
visitExpression(ThenKeyExpression thenKeyExpression)
Specific method that is called onThenKeyExpression
s.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.ExpansionVisitor
expand
-
-
-
-
Method Detail
-
getCurrentState
public ValueIndexLikeExpansionVisitor.VisitorState getCurrentState()
Description copied from interface:KeyExpressionVisitor
Method to return the (immutable) current state.- Specified by:
getCurrentState
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Returns:
- the current state of type
S
-
push
public ValueIndexLikeExpansionVisitor push(ValueIndexLikeExpansionVisitor.VisitorState newState)
-
pop
public ValueIndexLikeExpansionVisitor.VisitorState pop()
Method to pop and return the top of the states stack.- Returns:
- the currentState
-
pop
public <T> T pop(T t)
Functional pop to facilitate a more fluent way of interacting with the states.- Type Parameters:
T
- a type parameter- Parameters:
t
- some value of typeT
- Returns:
t
-
visitExpression
@Nonnull public final GraphExpansion visitExpression(@Nonnull KeyExpression keyExpression)
Specific implementation of the fall-back visitation method. Sub classes of this class do not tolerate visits from unknown sub classes ofKeyExpression
. Implementors of new sub classes ofKeyExpression
should also add a new visitation method inKeyExpressionVisitor
.- Specified by:
visitExpression
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Parameters:
keyExpression
- key expression to visit- Returns:
- does not return a result but throws an exception of type
UnsupportedOperationException
-
visitExpression
@Nonnull public GraphExpansion visitExpression(@Nonnull EmptyKeyExpression emptyKeyExpression)
Description copied from interface:KeyExpressionVisitor
Specific method that is called onEmptyKeyExpression
s.- Specified by:
visitExpression
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Parameters:
emptyKeyExpression
-EmptyKeyExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull public GraphExpansion visitExpression(@Nonnull FieldKeyExpression fieldKeyExpression)
Description copied from interface:KeyExpressionVisitor
Specific method that is called onFieldKeyExpression
s.- Specified by:
visitExpression
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Parameters:
fieldKeyExpression
-FieldKeyExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull public GraphExpansion visitExpression(@Nonnull KeyExpressionWithValue keyExpressionWithValue)
Description copied from interface:KeyExpressionVisitor
Specific method that is called onKeyExpressionWithValue
s.- Specified by:
visitExpression
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Parameters:
keyExpressionWithValue
-KeyExpressionWithValue
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull public GraphExpansion visitExpression(@Nonnull KeyWithValueExpression keyWithValueExpression)
Description copied from interface:KeyExpressionVisitor
Specific method that is called onKeyWithValueExpression
s.- Specified by:
visitExpression
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Parameters:
keyWithValueExpression
-KeyWithValueExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull public GraphExpansion visitExpression(@Nonnull NestingKeyExpression nestingKeyExpression)
Description copied from interface:KeyExpressionVisitor
Specific method that is called onNestingKeyExpression
s.- Specified by:
visitExpression
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Parameters:
nestingKeyExpression
-NestingKeyExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull public GraphExpansion visitExpression(@Nonnull ThenKeyExpression thenKeyExpression)
Description copied from interface:KeyExpressionVisitor
Specific method that is called onThenKeyExpression
s.- Specified by:
visitExpression
in interfaceKeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
- Parameters:
thenKeyExpression
-ThenKeyExpression
to visit- Returns:
- a new expression of type
R
-
-