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

java.lang.Object
  extended by com.atlassian.confluence.search.v2.lucene.CacheBackedLuceneSearchMapperRegistry
All Implemented Interfaces:
LuceneSearchMapperRegistry

public class CacheBackedLuceneSearchMapperRegistry
extends Object
implements LuceneSearchMapperRegistry

A search mapper registry that operates on a cache only. The purpose of this cache is to minimise lookups against the plugin subsystem. If a mapper cannot be found in the cache, this registry currently does not fall back to looking it up in the actual plugin subsystem.

This cache is initialised on the very first search mapper lookup and is only updated in response to a plugin event (see LuceneSearchMapperRegistryCacheUpdateListener).


Field Summary
protected  com.atlassian.plugin.PluginAccessor pluginAccessor
           
 
Constructor Summary
CacheBackedLuceneSearchMapperRegistry(com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 
Method Summary
 LuceneQueryMapper getQueryMapper(String key)
           
 LuceneResultFilterMapper getResultFilterMapper(String key)
           
 LuceneSearchFilterMapper getSearchFilterMapper(String key)
           
 LuceneSortMapper getSortMapper(String key)
           
 void synchronizeModuleDescriptorsCache()
          Initialise or refresh the cache of lucene mapper module descriptors from the plugin subsystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pluginAccessor

protected final com.atlassian.plugin.PluginAccessor pluginAccessor
Constructor Detail

CacheBackedLuceneSearchMapperRegistry

public CacheBackedLuceneSearchMapperRegistry(com.atlassian.plugin.PluginAccessor pluginAccessor)
Method Detail

getQueryMapper

public LuceneQueryMapper getQueryMapper(String key)
Specified by:
getQueryMapper in interface LuceneSearchMapperRegistry

getSortMapper

public LuceneSortMapper getSortMapper(String key)
Specified by:
getSortMapper in interface LuceneSearchMapperRegistry

getResultFilterMapper

public LuceneResultFilterMapper getResultFilterMapper(String key)
Specified by:
getResultFilterMapper 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

synchronizeModuleDescriptorsCache

public void synchronizeModuleDescriptorsCache()
Initialise or refresh the cache of lucene mapper module descriptors from the plugin subsystem



Copyright © 2003-2013 Atlassian. All Rights Reserved.