Class InvokerFactory

  • Direct Known Subclasses:
    RpcInvokerFactory

    public abstract class InvokerFactory
    extends java.lang.Object
    Author:
    ollivir
    • Constructor Detail

      • InvokerFactory

        public InvokerFactory​(SearchCluster searchCluster)
    • Method Detail

      • createSearchInvoker

        public java.util.Optional<SearchInvoker> createSearchInvoker​(VespaBackEndSearcher searcher,
                                                                     Query query,
                                                                     java.util.OptionalInt groupId,
                                                                     java.util.List<Node> nodes,
                                                                     boolean acceptIncompleteCoverage,
                                                                     int maxHits)
        Create a SearchInvoker for a list of content nodes.
        Parameters:
        searcher - the searcher processing the query
        query - the search query being processed
        groupId - the id of the node group to which the nodes belong
        nodes - pre-selected list of content nodes
        acceptIncompleteCoverage - if some of the nodes are unavailable and this parameter is false, verify that the remaining set of nodes has sufficient coverage
        Returns:
        the invoker or empty if some node in the list is invalid and the remaining coverage is not sufficient
      • createCoverageErrorInvoker

        protected static SearchInvoker createCoverageErrorInvoker​(java.util.List<Node> nodes,
                                                                  java.util.Set<java.lang.Integer> failed)
      • release

        public void release()