/** * Called when result is available. */ public void customResultAvailable(Collection<S> result) { for(S res: result) { intermediateResultAvailable(res); } finished(); }
public void resultAvailable(Boolean result) { if(!isFinished() && result) { if(Boolean.FALSE.equals(finished)) finished = null; // set finishing rankResults(); } }
public void exceptionOccurred(Exception exception) { notifyException(exception); } });
/** * */ protected void notifyException(Exception exception) { if(!isFinished()) { finished = Boolean.TRUE; future.setException(exception); } } }
/** * */ public void finished() { rankResults(); }
/** * Rank the services of a search with a specific ranker. */ public static <S> ITerminableIntermediateFuture<S> rankServices(ITerminableIntermediateFuture<S> searchfut, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider) { TerminableIntermediateDelegationFuture<S> ret = new TerminableIntermediateDelegationFuture<S>(); searchfut.addResultListener(new ServiceRankingDelegationResultListener<S>(ret, searchfut, ranker, decider)); return ret; }
public void resultAvailable(List<Tuple2<S, Double>> result) { notifyResults(result); }
/** * */ protected void notifyException(Exception exception) { if(!isFinished()) { finished = Boolean.TRUE; future.setException(exception); } } }
/** * */ public void finished() { rankResults(); }
/** * Rank the services of a search with a specific ranker. */ public static <S> ITerminableIntermediateFuture<S> rankServices(ITerminableIntermediateFuture<S> searchfut, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider) { TerminableIntermediateDelegationFuture<S> ret = new TerminableIntermediateDelegationFuture<S>(); searchfut.addResultListener(new ServiceRankingDelegationResultListener<S>(ret, searchfut, ranker, decider)); return ret; }
public void resultAvailable(List<Tuple2<S, Double>> result) { notifyResults(result); }
public void resultAvailable(Boolean result) { if(!isFinished() && result) { if(Boolean.FALSE.equals(finished)) finished = null; // set finishing rankResults(); } }
/** * Called when result is available. */ public void customResultAvailable(Collection<S> result) { for(S res: result) { intermediateResultAvailable(res); } finished(); }
/** * Called when exception occurs. */ public void exceptionOccurred(Exception exception) { notifyException(exception); }
/** * */ protected void notifyResults(List<Tuple2<S, Double>> results) { if(!isFinished()) { finished = Boolean.TRUE; for(Tuple2<S, Double> res: results) { future.addIntermediateResult(res.getFirstEntity()); } future.setFinished(); } }
public void exceptionOccurred(Exception exception) { notifyException(exception); } });
/** * */ protected void notifyResults(List<Tuple2<S, Double>> results) { if(!isFinished()) { finished = Boolean.TRUE; for(Tuple2<S, Double> res: results) { future.addIntermediateResult(res.getFirstEntity()); } future.setFinished(); } }
public void exceptionOccurred(Exception exception) { notifyException(exception); } });