Class MultiReaderBasedConnection

  • All Implemented Interfaces:
    MultiConnection

    public class MultiReaderBasedConnection
    extends Object
    implements 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 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:
        withReader in interface MultiConnection
        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:
        withSearch in interface MultiConnection
        Throws:
        com.atlassian.bonnie.LuceneException
      • withSearcher

        public <T> T withSearcher​(EnumSet<SearchIndex> indexes,
                                  long searchToken,
                                  com.atlassian.bonnie.ILuceneConnection.SearcherWithTokenAction<T> action)
                           throws com.atlassian.bonnie.SearchTokenExpiredException
        Specified by:
        withSearcher in interface MultiConnection
        Throws:
        IllegalArgumentException - if the provided token was issued for different set of indexes
        com.atlassian.bonnie.SearchTokenExpiredException