|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.query.impl.CacheQueryImpl
org.infinispan.query.clustered.ClusteredCacheQueryImpl
public class ClusteredCacheQueryImpl
A extension of CacheQueryImpl used for distributed queries.
Field Summary |
---|
Fields inherited from class org.infinispan.query.impl.CacheQueryImpl |
---|
cache, hSearchQuery, keyTransformationHandler |
Constructor Summary | |
---|---|
ClusteredCacheQueryImpl(org.apache.lucene.search.Query luceneQuery,
org.hibernate.search.spi.SearchFactoryIntegrator searchFactory,
ExecutorService asyncExecutor,
AdvancedCache<?,?> cache,
KeyTransformationHandler keyTransformationHandler,
Class<?>... classes)
|
Method Summary | |
---|---|
CacheQuery |
firstResult(int firstResult)
Sets the the result of the given integer value to the first result. |
int |
getResultSize()
Gets the integer number of results. |
ResultIterator |
iterator(FetchOptions fetchOptions)
Returns the results of a search as a ResultIterator . |
List<Object> |
list()
Returns the results of a search as a list. |
CacheQuery |
maxResults(int maxResults)
Sets the maximum number of results to the number passed in as a parameter. |
CacheQuery |
sort(org.apache.lucene.search.Sort sort)
Allows lucene to sort the results. |
CacheQuery |
timeout(long timeout,
TimeUnit timeUnit)
Set the timeout for this query. |
Methods inherited from class org.infinispan.query.impl.CacheQueryImpl |
---|
disableFullTextFilter, enableFullTextFilter, explain, filter, getFacetManager, iterator, projection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusteredCacheQueryImpl(org.apache.lucene.search.Query luceneQuery, org.hibernate.search.spi.SearchFactoryIntegrator searchFactory, ExecutorService asyncExecutor, AdvancedCache<?,?> cache, KeyTransformationHandler keyTransformationHandler, Class<?>... classes)
Method Detail |
---|
public CacheQuery maxResults(int maxResults)
CacheQuery
maxResults
in interface CacheQuery
maxResults
in class CacheQueryImpl
maxResults
- that are to be set to the maxResults.public CacheQuery firstResult(int firstResult)
CacheQueryImpl
firstResult
in interface CacheQuery
firstResult
in class CacheQueryImpl
firstResult
- index to be set.public CacheQuery sort(org.apache.lucene.search.Sort sort)
CacheQuery
sort
in interface CacheQuery
sort
in class CacheQueryImpl
sort
- - lucene sort objectpublic int getResultSize()
CacheQuery
getResultSize
in interface CacheQuery
getResultSize
in class CacheQueryImpl
public ResultIterator iterator(FetchOptions fetchOptions) throws org.hibernate.search.SearchException
CacheQuery
ResultIterator
.
Warning: the return type is an extension of Iterator
which introduces a ResultIterator.close()
method. This close method needs to be invoked when the iteration is complete to avoid resource leakage.
iterator
in interface CacheQuery
iterator
in class CacheQueryImpl
fetchOptions
- how to fetch results (see @link FetchOptions)
org.hibernate.search.SearchException
public List<Object> list() throws org.hibernate.search.SearchException
CacheQuery
list
in interface CacheQuery
list
in class CacheQueryImpl
org.hibernate.search.SearchException
public CacheQuery timeout(long timeout, TimeUnit timeUnit)
CacheQuery
timeout
in interface CacheQuery
timeout
in class CacheQueryImpl
timeout
- the timeout durationtimeUnit
- the time unit of the timeout parameter
|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |