com.atlassian.confluence.search.v2.lucene
Class ThreadCachedSearchMapperRegistry
java.lang.Object
com.atlassian.confluence.search.v2.lucene.ThreadCachedSearchMapperRegistry
- All Implemented Interfaces:
- LuceneSearchMapperRegistry
public class ThreadCachedSearchMapperRegistry
- extends Object
- implements LuceneSearchMapperRegistry
A facade onto the PluggableLuceneSearchMapperRegistry
which will first look for a
ThreadLocal cache of available search mappers before delegating.
This is necessary due to the current slowness involved in looking up available search mappers from the plugin
subsystem (see CONF-11920). The architectural strategy in Confluence is to move away from diverse caches
spread about the software - this class is a compromise in that the cache it uses will only exist for the duration of the
single search being performed.
This class should be considered in conjunction with the LuceneSearchManager
which is responsible for
creating and removing the thread local cache of available mappers.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadCachedSearchMapperRegistry
public ThreadCachedSearchMapperRegistry(LuceneSearchMapperRegistry delegateRegistry)
- Construct with the supplied registry to be used when mappers are not found in the thread local cache.
- Parameters:
delegateRegistry
-
getQueryMapper
public LuceneQueryMapper getQueryMapper(String key)
- Specified by:
getQueryMapper
in interface LuceneSearchMapperRegistry
getResultFilterMapper
public LuceneResultFilterMapper getResultFilterMapper(String key)
- Specified by:
getResultFilterMapper
in interface LuceneSearchMapperRegistry
getSortMapper
public LuceneSortMapper getSortMapper(String key)
- Specified by:
getSortMapper
in interface LuceneSearchMapperRegistry
getSearchFilterMapper
public LuceneSearchFilterMapper getSearchFilterMapper(String key)
- Specified by:
getSearchFilterMapper
in interface LuceneSearchMapperRegistry
- Parameters:
key
- the key of the SearchFilter
to fetch a mapper for
- Returns:
- a mapper for a search filter with the specified key