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) void
withSearch
(EnumSet<SearchIndex> indexes, ILuceneConnection.SearcherAction action) <T> T
withSearcher
(EnumSet<SearchIndex> indexes, long searchToken, ILuceneConnection.SearcherWithTokenAction<T> action) <T> T
withSearcher
(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:
withReader
in interfaceMultiConnection
- Throws:
LuceneException
-
withSearch
public void withSearch(EnumSet<SearchIndex> indexes, ILuceneConnection.SearcherAction action) throws LuceneException - Specified by:
withSearch
in interfaceMultiConnection
- Throws:
LuceneException
-
withSearcher
public <T> T withSearcher(EnumSet<SearchIndex> indexes, ILuceneConnection.SearcherWithTokenAction<T> action) - Specified by:
withSearcher
in interfaceMultiConnection
-
withSearcher
public <T> T withSearcher(EnumSet<SearchIndex> indexes, long searchToken, ILuceneConnection.SearcherWithTokenAction<T> action) throws SearchTokenExpiredException - Specified by:
withSearcher
in interfaceMultiConnection
- Throws:
IllegalArgumentException
- if the provided token was issued for different set of indexesSearchTokenExpiredException
-