public class

SearchMappersThreadLocal

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.search.v2.lucene.SearchMappersThreadLocal

Class Overview

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

Summary

Public Constructors
SearchMappersThreadLocal()
Public Methods
static void clearAllMappers()
static void findAndSetMappers(PluginAccessor pluginAccessor)

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

static Map<StringLuceneQueryMapper> getQueryMappers()
static Map<StringLuceneResultFilterMapper> getResultFilterMappers()
static Map<StringLuceneSearchFilterMapper> getSearchFilterMappers()
static Map<StringLuceneSortMapper> getSortMappers()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SearchMappersThreadLocal ()

Public Methods

public static void clearAllMappers ()

public static void findAndSetMappers (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.

public static Map<StringLuceneQueryMapper> getQueryMappers ()

Returns
  • the query mappers for this thread or null if there is no thread local cache of them.

public static Map<StringLuceneResultFilterMapper> getResultFilterMappers ()

Returns
  • the result filter mappers for this thread or null if there is no thread local cache of them.

public static Map<StringLuceneSearchFilterMapper> getSearchFilterMappers ()

Returns
  • the search filter mappers for this thread or null if there is no thread local cache of them.

public static Map<StringLuceneSortMapper> getSortMappers ()

Returns
  • the sort mappers for this thread or null if there is no thread local cache of them.