Class ServiceRankingResultListener<S>

    • Field Detail

      • results

        protected java.util.List<S> results
        The saved results.
      • finished

        protected boolean finished
        The listener state.
      • listener

        protected IResultListener<java.util.Collection<S>> listener
        The delegate listener.
      • scorelistener

        protected IResultListener<java.util.Collection<Tuple2<S,​java.lang.Double>>> scorelistener
        The delegate listener.
    • Method Detail

      • resultAvailable

        public void resultAvailable​(java.util.Collection<S> result)
        Called when result is available.
        Specified by:
        resultAvailable in interface IResultListener<S>
        Parameters:
        result - The result.
      • exceptionOccurred

        public void exceptionOccurred​(java.lang.Exception exception)
        Called when exception occurs.
        Specified by:
        exceptionOccurred in interface IResultListener<S>
        Parameters:
        exception - The exception.
      • finished

        public void finished()
        Description copied from interface: IIntermediateResultListener
        Declare that the future is finished. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method was called for all intermediate results before.
        Specified by:
        finished in interface IIntermediateResultListener<S>
      • maxResultCountAvailable

        public void maxResultCountAvailable​(int max)
        Description copied from interface: IIntermediateResultListener
        Declare that the future result count is available. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method will be called as often as the result count indicates except an exception occurs.
        Specified by:
        maxResultCountAvailable in interface IIntermediateResultListener<S>
      • isFinished

        public boolean isFinished()
        Get the finished.
        Returns:
        The finished.
      • rankResults

        protected void rankResults()
        Rank the results and announce them
      • notifyResults

        protected void notifyResults​(java.util.List<Tuple2<S,​java.lang.Double>> results)
      • notifyException

        protected void notifyException​(java.lang.Exception exception)