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.
Constructor and Description |
---|
ThreadCachedSearchMapperRegistry(LuceneSearchMapperRegistry delegateRegistry)
Construct with the supplied registry to be used when mappers are not found in the thread local cache.
|
Modifier and Type | Method and Description |
---|---|
LuceneQueryMapper |
getQueryMapper(String key) |
LuceneResultFilterMapper |
getResultFilterMapper(String key) |
LuceneSearchFilterMapper |
getSearchFilterMapper(String key) |
LuceneSortMapper |
getSortMapper(String key) |
public ThreadCachedSearchMapperRegistry(LuceneSearchMapperRegistry delegateRegistry)
delegateRegistry
- public LuceneQueryMapper getQueryMapper(String key)
getQueryMapper
in interface LuceneSearchMapperRegistry
public LuceneResultFilterMapper getResultFilterMapper(String key)
getResultFilterMapper
in interface LuceneSearchMapperRegistry
public LuceneSortMapper getSortMapper(String key)
getSortMapper
in interface LuceneSearchMapperRegistry
public LuceneSearchFilterMapper getSearchFilterMapper(String key)
getSearchFilterMapper
in interface LuceneSearchMapperRegistry
key
- the key of the SearchFilter
to fetch a mapper forCopyright © 2003–2015 Atlassian. All rights reserved.