if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, ce.toString(), ce);
@Override public boolean containsKey(final K key) { Future<V> f = _cache.get(key); if (f != null && f.isDone() && !f.isCancelled()) { try { // Call get() with a 0 timeout to avoid any wait V obj = f.get(0, TimeUnit.MILLISECONDS); if (_getExpiryChecker().isExpired(key, obj)) { // Note that we are using both key and value in remove() call to ensure // that we are not removing the Future added after expiry check by a different thread _cache.remove(key, f); } else { return true; } } catch (TimeoutException | ExecutionException ce) { } catch (CancellationException ce) { if (_LOGGER.isLoggable(Level.SEVERE)) { _LOGGER.log(Level.SEVERE, ce.toString(), ce); } } catch (InterruptedException ie) { throw new FacesException(ie); } } return false; }
if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, ce.toString(), ce);
_LOGGER.log(Level.SEVERE, ce.toString(), ce);
@Override public boolean containsKey(final K key) { Future<V> f = _cache.get(key); if (f != null && f.isDone() && !f.isCancelled()) { try { // Call get() with a 0 timeout to avoid any wait V obj = f.get(0, TimeUnit.MILLISECONDS); if (_getExpiryChecker().isExpired(key, obj)) { // Note that we are using both key and value in remove() call to ensure // that we are not removing the Future added after expiry check by a different thread _cache.remove(key, f); } else { return true; } } catch (TimeoutException | ExecutionException ce) { } catch (CancellationException ce) { if (_LOGGER.isLoggable(Level.SEVERE)) { _LOGGER.log(Level.SEVERE, ce.toString(), ce); } } catch (InterruptedException ie) { throw new FacesException(ie); } } return false; }
if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, ce.toString(), ce);
@Override public boolean containsKey(final K key) { Future<V> f = _cache.get(key); if (f != null && f.isDone() && !f.isCancelled()) { try { // Call get() with a 0 timeout to avoid any wait V obj = f.get(0, TimeUnit.MILLISECONDS); if (_getExpiryChecker().isExpired(key, obj)) { // Note that we are using both key and value in remove() call to ensure // that we are not removing the Future added after expiry check by a different thread _cache.remove(key, f); } else { return true; } } catch (TimeoutException | ExecutionException ce) { } catch (CancellationException ce) { if (_LOGGER.isLoggable(Level.SEVERE)) { _LOGGER.log(Level.SEVERE, ce.toString(), ce); } } catch (InterruptedException ie) { throw new FacesException(ie); } } return false; }
if (_LOGGER.isLoggable(Level.SEVERE)) { _LOGGER.log(Level.SEVERE, ce.toString(), ce);
if (_LOGGER.isLoggable(Level.SEVERE)) { _LOGGER.log(Level.SEVERE, ce.toString(), ce);
if (_LOGGER.isLoggable(Level.SEVERE)) { _LOGGER.log(Level.SEVERE, ce.toString(), ce);
if (_LOGGER.isLoggable(Level.SEVERE)) { _LOGGER.log(Level.SEVERE, ce.toString(), ce);
} catch (CancellationException e) { LOG.info("Cancelled while waiting for datanode " + datanode.getIpcAddr(false) + ": " + e.toString()); } catch (ExecutionException e) { Throwable t = e.getCause();
public void analyseFiles(SensorContext context, Iterable<InputFile> inputFiles, ProgressReport progressReport) { boolean success = false; try { for (InputFile inputFile : inputFiles) { if (context.isCancelled()) { throw new CancellationException( "Analysis interrupted because the SensorContext is in cancelled state"); } analyse(context, inputFile); progressReport.nextFile(); } success = true; } catch (CancellationException e) { // do not propagate the exception LOGGER.debug(e.toString()); } finally { stopProgressReport(progressReport, success); } }
} catch (CancellationException e) { LOG.info("Cancelled while waiting for datanode " + datanode.getIpcAddr(false) + ": " + e.toString()); } catch (ExecutionException e) { Throwable t = e.getCause();