Codota Logo
DiskLruCache.journalRebuildRequired
Code IndexAdd Codota to your IDE (free)

How to use
journalRebuildRequired
method
in
com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache

Best Java code snippets using com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache.journalRebuildRequired (Showing top 12 results out of 315)

  • Common ways to obtain DiskLruCache
private void myMethod () {
DiskLruCache d =
  • Codota IconFile directory;new DiskLruCache(directory, appVersion, valueCount, maxSize, maxFileCount)
  • Codota IconFile directory;DiskLruCache.open(directory, int1, int2, maxSize, maxFileCount)
  • Smart code suggestions by Codota
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Drops the entry for {@code key} if it exists and can be removed. Entries
 * actively being edited cannot be removed.
 *
 * @return true if an entry was removed.
 */
public synchronized boolean remove(String key) throws IOException {
  checkNotClosed();
  validateKey(key);
  Entry entry = lruEntries.get(key);
  if (entry == null || entry.currentEditor != null) {
    return false;
  }
  for (int i = 0; i < valueCount; i++) {
    File file = entry.getCleanFile(i);
    if (file.exists() && !file.delete()) {
      throw new IOException("failed to delete " + file);
    }
    size -= entry.lengths[i];
    fileCount--;
    entry.lengths[i] = 0;
  }
  redundantOpCount++;
  journalWriter.append(REMOVE + ' ' + key + '\n');
  lruEntries.remove(key);
  if (journalRebuildRequired()) {
    executorService.submit(cleanupCallable);
  }
  return true;
}
origin: nostra13/Android-Universal-Image-Loader

if (size > maxSize || fileCount > maxFileCount || journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
origin: nostra13/Android-Universal-Image-Loader

if (journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

/**
 * Drops the entry for {@code key} if it exists and can be removed. Entries
 * actively being edited cannot be removed.
 *
 * @return true if an entry was removed.
 */
public synchronized boolean remove(String key) throws IOException {
  checkNotClosed();
  validateKey(key);
  Entry entry = lruEntries.get(key);
  if (entry == null || entry.currentEditor != null) {
    return false;
  }
  for (int i = 0; i < valueCount; i++) {
    File file = entry.getCleanFile(i);
    if (file.exists() && !file.delete()) {
      throw new IOException("failed to delete " + file);
    }
    size -= entry.lengths[i];
    fileCount--;
    entry.lengths[i] = 0;
  }
  redundantOpCount++;
  journalWriter.append(REMOVE + ' ' + key + '\n');
  lruEntries.remove(key);
  if (journalRebuildRequired()) {
    executorService.submit(cleanupCallable);
  }
  return true;
}
origin: com.nostra13.universalimageloader/universal-image-loader

/**
 * Drops the entry for {@code key} if it exists and can be removed. Entries
 * actively being edited cannot be removed.
 *
 * @return true if an entry was removed.
 */
public synchronized boolean remove(String key) throws IOException {
  checkNotClosed();
  validateKey(key);
  Entry entry = lruEntries.get(key);
  if (entry == null || entry.currentEditor != null) {
    return false;
  }
  for (int i = 0; i < valueCount; i++) {
    File file = entry.getCleanFile(i);
    if (file.exists() && !file.delete()) {
      throw new IOException("failed to delete " + file);
    }
    size -= entry.lengths[i];
    fileCount--;
    entry.lengths[i] = 0;
  }
  redundantOpCount++;
  journalWriter.append(REMOVE + ' ' + key + '\n');
  lruEntries.remove(key);
  if (journalRebuildRequired()) {
    executorService.submit(cleanupCallable);
  }
  return true;
}
origin: wanliyang1990/WliveTV

/**
 * Drops the entry for {@code key} if it exists and can be removed. Entries
 * actively being edited cannot be removed.
 *
 * @return true if an entry was removed.
 */
public synchronized boolean remove(String key) throws IOException {
  checkNotClosed();
  validateKey(key);
  Entry entry = lruEntries.get(key);
  if (entry == null || entry.currentEditor != null) {
    return false;
  }
  for (int i = 0; i < valueCount; i++) {
    File file = entry.getCleanFile(i);
    if (file.exists() && !file.delete()) {
      throw new IOException("failed to delete " + file);
    }
    size -= entry.lengths[i];
    fileCount--;
    entry.lengths[i] = 0;
  }
  redundantOpCount++;
  journalWriter.append(REMOVE + ' ' + key + '\n');
  lruEntries.remove(key);
  if (journalRebuildRequired()) {
    executorService.submit(cleanupCallable);
  }
  return true;
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

if (size > maxSize || fileCount > maxFileCount || journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
origin: com.nostra13.universalimageloader/universal-image-loader

if (size > maxSize || fileCount > maxFileCount || journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
origin: wanliyang1990/WliveTV

if (size > maxSize || fileCount > maxFileCount || journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
origin: com.nostra13.universalimageloader/universal-image-loader

if (journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

if (journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
origin: wanliyang1990/WliveTV

if (journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
com.nostra13.universalimageloader.cache.disc.impl.extDiskLruCachejournalRebuildRequired

Javadoc

We only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 ops.

Popular methods of DiskLruCache

  • <init>
  • checkNotClosed
  • close
    Closes this cache. Stored values will remain on the filesystem.
  • delete
    Closes the cache and deletes all of its stored values. This will delete all files in the cache direc
  • deleteIfExists
  • edit
  • get
    Returns a snapshot of the entry named key, or null if it doesn't exist is not currently readable. If
  • getDirectory
    Returns the directory where this cache stores its data.
  • getMaxFileCount
    Returns the maximum number of files that this cache should store
  • getMaxSize
    Returns the maximum number of bytes that this cache should use to store its data.
  • open
    Opens the cache in directory, creating a cache if none exists there.
  • processJournal
    Computes the initial size and collects garbage as a part of opening the cache. Dirty entries are ass
  • open,
  • processJournal,
  • readJournal,
  • readJournalLine,
  • rebuildJournal,
  • remove,
  • renameTo,
  • trimToFileCount,
  • trimToSize

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • startActivity (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ImageIO (javax.imageio)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now