com.atlassian.confluence.search.v2.lucene
Class SearchMappersThreadLocal

java.lang.Object
  extended by com.atlassian.confluence.search.v2.lucene.SearchMappersThreadLocal

public class SearchMappersThreadLocal
extends Object

Holds a thread local cache of plugin mappers involved in search.


Constructor Summary
SearchMappersThreadLocal()
           
 
Method Summary
static void clearAllMappers()
           
static void findAndSetMappers(com.atlassian.plugin.PluginAccessor pluginAccessor)
           Using the supplied PluginAccessor find all of the currently available search mappers and set them on the thread local.
static Map<String,LuceneQueryMapper> getQueryMappers()
           
static Map<String,LuceneResultFilterMapper> getResultFilterMappers()
           
static Map<String,LuceneSearchFilterMapper> getSearchFilterMappers()
           
static Map<String,LuceneSortMapper> getSortMappers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchMappersThreadLocal

public SearchMappersThreadLocal()
Method Detail

findAndSetMappers

public static void findAndSetMappers(com.atlassian.plugin.PluginAccessor pluginAccessor)

Using the supplied PluginAccessor find all of the currently available search mappers and set them on the thread local.

As an optimisation over calling the plugin system 3 times, once for each category of mapper required, this method instead gets all enabled plugin modules and separates them itself into the 3 different category (this should result in a total of one less iteration over the plugins).

Parameters:
pluginAccessor - the PluginAccessor to be used to find the available mapper modules.

getQueryMappers

public static Map<String,LuceneQueryMapper> getQueryMappers()
Returns:
the query mappers for this thread or null if there is no thread local cache of them.

getSortMappers

public static Map<String,LuceneSortMapper> getSortMappers()
Returns:
the sort mappers for this thread or null if there is no thread local cache of them.

getResultFilterMappers

public static Map<String,LuceneResultFilterMapper> getResultFilterMappers()
Returns:
the result filter mappers for this thread or null if there is no thread local cache of them.

getSearchFilterMappers

public static Map<String,LuceneSearchFilterMapper> getSearchFilterMappers()
Returns:
the search filter mappers for this thread or null if there is no thread local cache of them.

clearAllMappers

public static void clearAllMappers()


Copyright © 2003-2012 Atlassian. All Rights Reserved.