Class ThreadCachedSearchMapperRegistry

  extended by
All Implemented Interfaces:

public class ThreadCachedSearchMapperRegistry
extends java.lang.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 Summary
ThreadCachedSearchMapperRegistry(LuceneSearchMapperRegistry delegateRegistry)
          Construct with the supplied registry to be used when mappers are not found in the thread local cache.
Method Summary
 LuceneQueryMapper getQueryMapper(java.lang.String key)
 LuceneResultFilterMapper getResultFilterMapper(java.lang.String key)
 LuceneSearchFilterMapper getSearchFilterMapper(java.lang.String key)
 LuceneSortMapper getSortMapper(java.lang.String key)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ThreadCachedSearchMapperRegistry(LuceneSearchMapperRegistry delegateRegistry)
Construct with the supplied registry to be used when mappers are not found in the thread local cache.

delegateRegistry -
Method Detail


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


public LuceneResultFilterMapper getResultFilterMapper(java.lang.String key)
Specified by:
getResultFilterMapper in interface LuceneSearchMapperRegistry


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


public LuceneSearchFilterMapper getSearchFilterMapper(java.lang.String key)
Specified by:
getSearchFilterMapper in interface LuceneSearchMapperRegistry
key - the key of the SearchFilter to fetch a mapper for
a mapper for a search filter with the specified key

Copyright © 2003-2014 Atlassian. All Rights Reserved.