/** * Clears disk cache. * * <p> * This method should always be called on a background thread, since it is a blocking call. * </p> */ // Public API. @SuppressWarnings({"unused", "WeakerAccess"}) public void clearDiskCache() { Util.assertBackgroundThread(); engine.clearDiskCache(); }
private synchronized R doGet(Long timeoutMillis) throws ExecutionException, InterruptedException, TimeoutException { if (assertBackgroundThread && !isDone()) { Util.assertBackgroundThread();
/** * Clears disk cache. * * <p> * This method should always be called on a background thread, since it is a blocking call. * </p> */ public void clearDiskCache() { Util.assertBackgroundThread(); getEngine().clearDiskCache(); }
private synchronized R doGet(Long timeoutMillis) throws ExecutionException, InterruptedException, TimeoutException { if (assertBackgroundThread) { Util.assertBackgroundThread(); } if (isCancelled) { throw new CancellationException(); } else if (exceptionReceived) { throw new ExecutionException(exception); } else if (resultReceived) { return resource; } if (timeoutMillis == null) { waiter.waitForTimeout(this, 0); } else if (timeoutMillis > 0) { waiter.waitForTimeout(this, timeoutMillis); } if (Thread.interrupted()) { throw new InterruptedException(); } else if (exceptionReceived) { throw new ExecutionException(exception); } else if (isCancelled) { throw new CancellationException(); } else if (!resultReceived) { throw new TimeoutException(); } return resource; }
/** * Clears disk cache. * * <p> * This method should always be called on a background thread, since it is a blocking call. * </p> */ @SuppressWarnings("unused") // Public API public void clearDiskCache() { Util.assertBackgroundThread(); engine.clearDiskCache(); }
private synchronized R doGet(Long timeoutMillis) throws ExecutionException, InterruptedException, TimeoutException { if (assertBackgroundThread && !isDone()) { Util.assertBackgroundThread(); } if (isCancelled) { throw new CancellationException(); } else if (loadFailed) { throw new ExecutionException(new IllegalStateException("Load failed")); } else if (resultReceived) { return resource; } if (timeoutMillis == null) { waiter.waitForTimeout(this, 0); } else if (timeoutMillis > 0) { waiter.waitForTimeout(this, timeoutMillis); } if (Thread.interrupted()) { throw new InterruptedException(); } else if (loadFailed) { throw new ExecutionException(new IllegalStateException("Load failed")); } else if (isCancelled) { throw new CancellationException(); } else if (!resultReceived) { throw new TimeoutException(); } return resource; }