com.amazon.carbonado.qe
Class IndexedQueryAnalyzer<S extends Storable>

java.lang.Object
  extended by com.amazon.carbonado.qe.IndexedQueryAnalyzer<S>

public class IndexedQueryAnalyzer<S extends Storable>
extends Object

Analyzes a simple query specification and determines which index is best suited for its execution. Query filters passed to this analyzer cannot contain any 'or' operations.

IndexedQueryAnalyzer 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
See Also:
UnionQueryAnalyzer

Nested Class Summary
 class IndexedQueryAnalyzer.Result
           
 
Constructor Summary
IndexedQueryAnalyzer(Class<S> type, RepositoryAccess access)
           
 
Method Summary
 IndexedQueryAnalyzer.Result analyze(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
           
 Class<S> getStorableType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedQueryAnalyzer

public IndexedQueryAnalyzer(Class<S> type,
                            RepositoryAccess access)
Parameters:
type - type of storable being queried
access - repository access for examing available indexes
Throws:
IllegalArgumentException - if type or indexProvider is null
Method Detail

getStorableType

public Class<S> getStorableType()

analyze

public IndexedQueryAnalyzer.Result analyze(Filter<S> filter,
                                           OrderingList<S> ordering,
                                           QueryHints hints)
                                    throws SupportException,
                                           RepositoryException
Parameters:
filter - optional filter which which must be bound and cannot contain any logical 'or' operations.
ordering - optional properties which define desired ordering
hints - optional query hints
Throws:
IllegalArgumentException - if filter is not supported
SupportException
RepositoryException


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.