Package nz.org.riskscape.engine.join
Class NoIndexIndexer
java.lang.Object
nz.org.riskscape.engine.join.JoinIndexer
nz.org.riskscape.engine.join.NoIndexIndexer
JoinIndexer that does nothing, so should always work, albeit slowly
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.engine.join.JoinIndexer
JoinIndexer.Constructor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JoinIndexer.Constructorstatic final intThe default capacity that the index will be created to contain.Fields inherited from class nz.org.riskscape.engine.join.JoinIndexer
expressionRealizer, join -
Constructor Summary
ConstructorsConstructorDescriptionNoIndexIndexer(nz.org.riskscape.engine.join.Join join, int initialIndexSize, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToIndex(nz.org.riskscape.engine.Tuple rhs) nz.org.riskscape.engine.relation.TupleIteratorcreateRhsIterator(nz.org.riskscape.engine.Tuple lhs) Create aTupleIteratorthat will contain at least the set ofTuples that are needed to completely join the lhs to the rhs based on the join.booleanisUsable()toString()Methods inherited from class nz.org.riskscape.engine.join.JoinIndexer
getExpressionRealizer, getJoin
-
Field Details
-
DEFAULT_INITIAL_INDEX_SIZE
public static final int DEFAULT_INITIAL_INDEX_SIZEThe default capacity that the index will be created to contain.
The NoIndexIndexer contains items individually. So for best performance the initial index should be as large as the expected number of items.
- See Also:
-
CONSTRUCTOR
-
-
Constructor Details
-
NoIndexIndexer
public NoIndexIndexer(nz.org.riskscape.engine.join.Join join, int initialIndexSize, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer)
-
-
Method Details
-
addToIndex
public void addToIndex(nz.org.riskscape.engine.Tuple rhs) - Specified by:
addToIndexin classJoinIndexer
-
createRhsIterator
public nz.org.riskscape.engine.relation.TupleIterator createRhsIterator(nz.org.riskscape.engine.Tuple lhs) Description copied from class:JoinIndexerCreate a
TupleIteratorthat will contain at least the set ofTuples that are needed to completely join the lhs to the rhs based on the join.- Specified by:
createRhsIteratorin classJoinIndexer
-
isUsable
public boolean isUsable()- Specified by:
isUsablein classJoinIndexer- Returns:
- true if this join can be used, e.g. it's suitable for the query and join. This is intended as a simpler
way of providing a set of implementations such that the
DefaultJoinercan work through which ones are appropriate by checking this method.
-
toString
-