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 ofILuceneConnectionand searches the union of several indexes on the fly- Since:
- 7.9.0
-
-
Constructor Summary
Constructors Constructor Description MultiReaderBasedConnection(com.atlassian.bonnie.ILuceneConnection.Configuration connectionConfig, Map<SearchIndex,com.atlassian.bonnie.ILuceneConnection> connectionByIndex)MultiReaderBasedConnection(SearchIndex index, com.atlassian.bonnie.ILuceneConnection connection)MultiReaderBasedConnection(Map<SearchIndex,com.atlassian.bonnie.ILuceneConnection> connectionByIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectwithReader(EnumSet<SearchIndex> indexes, com.atlassian.bonnie.ILuceneConnection.ReaderAction action)voidwithSearch(EnumSet<SearchIndex> indexes, com.atlassian.bonnie.ILuceneConnection.SearcherAction action)<T> TwithSearcher(EnumSet<SearchIndex> indexes, long searchToken, com.atlassian.bonnie.ILuceneConnection.SearcherWithTokenAction<T> action)<T> TwithSearcher(EnumSet<SearchIndex> indexes, com.atlassian.bonnie.ILuceneConnection.SearcherWithTokenAction<T> action)
-
-
-
Constructor Detail
-
MultiReaderBasedConnection
public MultiReaderBasedConnection(SearchIndex index, com.atlassian.bonnie.ILuceneConnection connection)
-
MultiReaderBasedConnection
public MultiReaderBasedConnection(Map<SearchIndex,com.atlassian.bonnie.ILuceneConnection> connectionByIndex)
-
MultiReaderBasedConnection
public MultiReaderBasedConnection(com.atlassian.bonnie.ILuceneConnection.Configuration connectionConfig, Map<SearchIndex,com.atlassian.bonnie.ILuceneConnection> connectionByIndex)
-
-
Method Detail
-
withReader
public Object withReader(EnumSet<SearchIndex> indexes, com.atlassian.bonnie.ILuceneConnection.ReaderAction action) throws com.atlassian.bonnie.LuceneException
- Specified by:
withReaderin interfaceMultiConnection- Throws:
com.atlassian.bonnie.LuceneException
-
withSearch
public void withSearch(EnumSet<SearchIndex> indexes, com.atlassian.bonnie.ILuceneConnection.SearcherAction action) throws com.atlassian.bonnie.LuceneException
- Specified by:
withSearchin interfaceMultiConnection- Throws:
com.atlassian.bonnie.LuceneException
-
withSearcher
public <T> T withSearcher(EnumSet<SearchIndex> indexes, com.atlassian.bonnie.ILuceneConnection.SearcherWithTokenAction<T> action)
- Specified by:
withSearcherin interfaceMultiConnection
-
withSearcher
public <T> T withSearcher(EnumSet<SearchIndex> indexes, long searchToken, com.atlassian.bonnie.ILuceneConnection.SearcherWithTokenAction<T> action) throws com.atlassian.bonnie.SearchTokenExpiredException
- Specified by:
withSearcherin interfaceMultiConnection- Throws:
IllegalArgumentException- if the provided token was issued for different set of indexescom.atlassian.bonnie.SearchTokenExpiredException
-
-