com.amazon.carbonado.qe
Class UnionQueryAnalyzer<S extends Storable>
java.lang.Object
com.amazon.carbonado.qe.UnionQueryAnalyzer<S>
- All Implemented Interfaces:
- QueryExecutorFactory<S>
public class UnionQueryAnalyzer<S extends Storable>
- extends Object
- implements QueryExecutorFactory<S>
Analyzes a query specification and determines how it can be executed as a
union of smaller queries. If necessary, the UnionQueryAnalyzer will alter
the query slightly, imposing a total ordering. Internally, an IndexedQueryAnalyzer is used for selecting the best indexes.
UnionQueryAnalyzer is sharable and thread-safe. An instance for a
particular Storable type can be cached, avoiding repeated construction
cost. In addition, the analyzer caches learned foreign indexes.
- Author:
- Brian S O'Neill
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnionQueryAnalyzer
public UnionQueryAnalyzer(Class<S> type,
RepositoryAccess access)
- Parameters:
type - type of storable being queriedaccess - repository access for examing available indexes
- Throws:
IllegalArgumentException - if type or indexProvider is null
getStorableType
public Class<S> getStorableType()
- Specified by:
getStorableType in interface QueryExecutorFactory<S extends Storable>
analyze
public UnionQueryAnalyzer.Result analyze(Filter<S> filter,
OrderingList<S> ordering,
QueryHints hints)
throws SupportException,
RepositoryException
- Parameters:
filter - optional filter which must be boundordering - optional properties which define desired orderinghints - optional query hints
- Throws:
SupportException
RepositoryException
executor
public QueryExecutor<S> executor(Filter<S> filter,
OrderingList<S> ordering,
QueryHints hints)
throws RepositoryException
- Returns an executor that handles the given query specification.
- Specified by:
executor in interface QueryExecutorFactory<S extends Storable>
- Parameters:
filter - optional filter which must be boundordering - optional properties which define desired orderinghints - optional query hints
- Throws:
RepositoryException
Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.