Package org.apache.lucene.monitor
Class WritableQueryIndex
java.lang.Object
org.apache.lucene.monitor.QueryIndex
org.apache.lucene.monitor.WritableQueryIndex
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
(package private) static final class
A Collector that decodes the stored query for each document hit.Nested classes/interfaces inherited from class org.apache.lucene.monitor.QueryIndex
QueryIndex.CachePopulator, QueryIndex.DataValues, QueryIndex.FIELDS, QueryIndex.QueryBuilder, QueryIndex.QueryCollector, QueryIndex.QueryTermFilter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Object
private static final BytesRef
protected long
private final Presearcher
private Map<String,
QueryCacheEntry> private final ScheduledExecutorService
private final ReadWriteLock
protected ConcurrentMap<String,
QueryCacheEntry> private final IndexWriter
Fields inherited from class org.apache.lucene.monitor.QueryIndex
decomposer, listeners, manager, serializer, termFilters
-
Constructor Summary
ConstructorsConstructorDescriptionWritableQueryIndex
(MonitorConfiguration configuration, Presearcher presearcher) -
Method Summary
Modifier and TypeMethodDescriptionprivate List<WritableQueryIndex.Indexable>
buildIndexables
(List<MonitorQuery> updates) int
void
clear()
void
close()
void
commit
(List<MonitorQuery> updates) private void
commitWithoutNotify
(List<MonitorQuery> updates) void
deleteQueries
(List<String> ids) long
int
numDocs()
private void
populateQueryCache
(MonitorQuerySerializer serializer, QueryDecomposer decomposer) void
(package private) void
purgeCache
(QueryIndex.CachePopulator populator) long
search
(QueryIndex.QueryBuilder queryBuilder, QueryIndex.QueryCollector matcher) Methods inherited from class org.apache.lucene.monitor.QueryIndex
addListener, getQuery, scan, search
-
Field Details
-
writer
-
presearcher
-
purgeCache
-
purgeLock
-
commitLock
-
purgeExecutor
-
queries
-
lastPurged
protected long lastPurged -
EMPTY
-
-
Constructor Details
-
WritableQueryIndex
WritableQueryIndex(MonitorConfiguration configuration, Presearcher presearcher) throws IOException - Throws:
IOException
-
-
Method Details
-
commit
- Specified by:
commit
in classQueryIndex
- Throws:
IOException
-
commitWithoutNotify
- Throws:
IOException
-
populateQueryCache
private void populateQueryCache(MonitorQuerySerializer serializer, QueryDecomposer decomposer) throws IOException - Throws:
IOException
-
buildIndexables
-
search
public long search(QueryIndex.QueryBuilder queryBuilder, QueryIndex.QueryCollector matcher) throws IOException - Specified by:
search
in classQueryIndex
- Throws:
IOException
-
purgeCache
- Specified by:
purgeCache
in classQueryIndex
- Throws:
IOException
-
purgeCache
- Specified by:
purgeCache
in classQueryIndex
- Throws:
IOException
-
close
- Throws:
IOException
-
numDocs
- Specified by:
numDocs
in classQueryIndex
- Throws:
IOException
-
cacheSize
public int cacheSize()- Specified by:
cacheSize
in classQueryIndex
-
deleteQueries
- Specified by:
deleteQueries
in classQueryIndex
- Throws:
IOException
-
clear
- Specified by:
clear
in classQueryIndex
- Throws:
IOException
-
getLastPurged
public long getLastPurged()- Specified by:
getLastPurged
in classQueryIndex
-