Class MultiReaderBasedConnection
java.lang.Object
com.atlassian.confluence.impl.search.v2.lucene.MultiReaderBasedConnection
- All Implemented Interfaces:
MultiConnection
This special connections acts as a readonly version of
ILuceneConnection and searches the union of several
indexes on the fly- Since:
- 7.9.0
-
Constructor Summary
ConstructorsConstructorDescriptionMultiReaderBasedConnection(ILuceneConnection.Configuration connectionConfig, Map<SearchIndex, ILuceneConnection> connectionByIndex) MultiReaderBasedConnection(SearchIndex index, ILuceneConnection connection) MultiReaderBasedConnection(Map<SearchIndex, ILuceneConnection> connectionByIndex) -
Method Summary
Modifier and TypeMethodDescriptionwithReader(EnumSet<SearchIndex> indexes, ILuceneConnection.ReaderAction action) voidwithSearch(EnumSet<SearchIndex> indexes, ILuceneConnection.SearcherAction action) <T> TwithSearcher(EnumSet<SearchIndex> indexes, long searchToken, ILuceneConnection.SearcherWithTokenAction<T> action) <T> TwithSearcher(EnumSet<SearchIndex> indexes, ILuceneConnection.SearcherWithTokenAction<T> action)
-
Constructor Details
-
MultiReaderBasedConnection
-
MultiReaderBasedConnection
-
MultiReaderBasedConnection
public MultiReaderBasedConnection(ILuceneConnection.Configuration connectionConfig, Map<SearchIndex, ILuceneConnection> connectionByIndex)
-
-
Method Details
-
withReader
public Object withReader(EnumSet<SearchIndex> indexes, ILuceneConnection.ReaderAction action) throws LuceneException - Specified by:
withReaderin interfaceMultiConnection- Throws:
LuceneException
-
withSearch
public void withSearch(EnumSet<SearchIndex> indexes, ILuceneConnection.SearcherAction action) throws LuceneException - Specified by:
withSearchin interfaceMultiConnection- Throws:
LuceneException
-
withSearcher
public <T> T withSearcher(EnumSet<SearchIndex> indexes, ILuceneConnection.SearcherWithTokenAction<T> action) - Specified by:
withSearcherin interfaceMultiConnection
-
withSearcher
public <T> T withSearcher(EnumSet<SearchIndex> indexes, long searchToken, ILuceneConnection.SearcherWithTokenAction<T> action) throws SearchTokenExpiredException - Specified by:
withSearcherin interfaceMultiConnection- Throws:
IllegalArgumentException- if the provided token was issued for different set of indexesSearchTokenExpiredException
-