Interface IndexQueryabilityFilter
-
- All Superinterfaces:
QueryHashable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@API(EXPERIMENTAL) @FunctionalInterface public interface IndexQueryabilityFilter extends QueryHashable
A filter used to determine whether an index should be considered when planning queries.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.QueryHashable
QueryHashable.QueryHashKind
-
-
Field Summary
Fields Modifier and Type Field Description static IndexQueryabilityFilter
DEFAULT
The default index queryability filter which uses all indexes except those with theIndexOptions.ALLOWED_FOR_QUERY_OPTION
set tofalse
.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
isQueryable(Index index)
Return whether the given index should be considered by the query planner.default int
queryHash(QueryHashable.QueryHashKind hashKind)
Default implementation ofQueryHashable.queryHash(com.apple.foundationdb.record.QueryHashable.QueryHashKind)
.
-
-
-
Field Detail
-
DEFAULT
static final IndexQueryabilityFilter DEFAULT
The default index queryability filter which uses all indexes except those with theIndexOptions.ALLOWED_FOR_QUERY_OPTION
set tofalse
.
-
-
Method Detail
-
isQueryable
boolean isQueryable(@Nonnull Index index)
Return whether the given index should be considered by the query planner. Note that the planner is not required to use an index for whichisQueryable()
istrue
.- Parameters:
index
- an index- Returns:
- whether the given index should be considered by the planner
-
queryHash
default int queryHash(@Nonnull QueryHashable.QueryHashKind hashKind)
Default implementation ofQueryHashable.queryHash(com.apple.foundationdb.record.QueryHashable.QueryHashKind)
. This implementation returns '0' so unless the specific concrete implementation ofIndexQueryabilityFilter
overrides it, there will be no impact on the total hashcode for the query.Note: This should be overridden in specific implementations in order to be able to distinguish among various queries that differ only by their
IndexQueryabilityFilter
.- Specified by:
queryHash
in interfaceQueryHashable
- Parameters:
hashKind
- the "kind" of hash to calculate. Ignored for this implementation.- Returns:
- 0 as the calculated hash in all cases, to have no impact on query hashes.
-
-