Class MultiReaderBasedConnection
- java.lang.Object
-
- com.atlassian.confluence.impl.search.v2.lucene.MultiReaderBasedConnection
-
- All Implemented Interfaces:
MultiConnection
public class MultiReaderBasedConnection extends Object implements MultiConnection
This special connections acts as a readonly version ofILuceneConnection
and searches the union of several indexes on the fly- Since:
- 7.9.0
-
-
Constructor Summary
Constructors Constructor Description MultiReaderBasedConnection(ILuceneConnection.Configuration connectionConfig, Map<SearchIndex,ILuceneConnection> connectionByIndex)
MultiReaderBasedConnection(SearchIndex index, ILuceneConnection connection)
MultiReaderBasedConnection(Map<SearchIndex,ILuceneConnection> connectionByIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
withReader(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 Detail
-
MultiReaderBasedConnection
public MultiReaderBasedConnection(SearchIndex index, ILuceneConnection connection)
-
MultiReaderBasedConnection
public MultiReaderBasedConnection(Map<SearchIndex,ILuceneConnection> connectionByIndex)
-
MultiReaderBasedConnection
public MultiReaderBasedConnection(ILuceneConnection.Configuration connectionConfig, Map<SearchIndex,ILuceneConnection> connectionByIndex)
-
-
Method Detail
-
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
-
-