|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.query.clustered.QueryBox
public class QueryBox
Each node in the cluster has a QueryBox instance. The QueryBox keep the active lazy iterators (actually it keeps the DocumentExtractor of the searches) on the cluster, so it can return values for the queries in a "lazy" way. When a DistributedLazyIterator is created, every nodes creates a DocumentExtractor and register it in your own QueryBox. So, the LazyIterator can fetch the values in a lazy way. EVICTION: Currently the QueryBox keeps the last BOX_LIMIT DocumentExtractor used... probably there is a better way.
Constructor Summary | |
---|---|
QueryBox()
|
Method Summary | |
---|---|
UUID |
getMyId()
Id of this QueryBox |
Object |
getValue(UUID queryUuid,
int docIndex)
Get the "docIndex" value on the correct DocumentExtractor |
void |
kill(UUID id)
Kill the query (DocumentExtractor) |
void |
put(UUID id,
org.hibernate.search.query.engine.spi.DocumentExtractor extractor)
Register a query (DocumentExtractor), so we can lazily load the results. |
void |
setCache(AdvancedCache<?,?> cache)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryBox()
Method Detail |
---|
public Object getValue(UUID queryUuid, int docIndex)
queryUuid
- The queryId, so we can get the correct DocumentExtractordocIndex
- value index in the DocumentExtractor
public void kill(UUID id)
id
- The id of the querypublic void put(UUID id, org.hibernate.search.query.engine.spi.DocumentExtractor extractor)
id
- The id of the queryextractor
- The querypublic UUID getMyId()
public void setCache(AdvancedCache<?,?> cache)
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |