@Override public Boolean call() throws Exception { boolean result = true; final Engine e = EngineFactory.getEngine(EngineFactory.DEFAULT); final LocalDate oldest = securityNode.getHistoryNodes().get(0).getLocalDate(); if (e != null && securityNode.getQuoteSource() != QuoteSource.NONE) { final Set<SecurityHistoryEvent> oldHistoryEvents = new HashSet<>(securityNode.getHistoryEvents()); for (final SecurityHistoryEvent securityHistoryEvent : YahooEventParser.retrieveNew(securityNode)) { if (!Thread.currentThread().isInterrupted()) { // check for thread interruption if (securityHistoryEvent.getDate().isAfter(oldest) || securityHistoryEvent.getDate().isEqual(oldest)) { if (!oldHistoryEvents.contains(securityHistoryEvent)) { result = e.addSecurityHistoryEvent(securityNode, securityHistoryEvent); if (result) { logger.info( ResourceUtils.getString( "Message.UpdatedSecurityEvent", securityNode.getSymbol())); } } } } } } return result; }