Tabnine Logo
DiskLruCache$Value.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.bumptech.glide.disklrucache.DiskLruCache$Value
constructor

Best Java code snippets using com.bumptech.glide.disklrucache.DiskLruCache$Value.<init> (Showing top 3 results out of 315)

origin: guolindev/giffun

/**
 * Returns a snapshot of the entry named {@code key}, or null if it doesn't
 * exist is not currently readable. If a value is returned, it is moved to
 * the head of the LRU queue.
 */
public synchronized Value get(String key) throws IOException {
 checkNotClosed();
 Entry entry = lruEntries.get(key);
 if (entry == null) {
  return null;
 }
 if (!entry.readable) {
  return null;
 }
 for (File file : entry.cleanFiles) {
   // A file must have been deleted manually!
   if (!file.exists()) {
     return null;
   }
 }
 redundantOpCount++;
 journalWriter.append(READ);
 journalWriter.append(' ');
 journalWriter.append(key);
 journalWriter.append('\n');
 if (journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
 }
 return new Value(key, entry.sequenceNumber, entry.cleanFiles, entry.lengths);
}
origin: mozilla-tw/FirefoxLite

/**
 * Returns a snapshot of the entry named {@code key}, or null if it doesn't
 * exist is not currently readable. If a value is returned, it is moved to
 * the head of the LRU queue.
 */
public synchronized Value get(String key) throws IOException {
 checkNotClosed();
 Entry entry = lruEntries.get(key);
 if (entry == null) {
  return null;
 }
 if (!entry.readable) {
  return null;
 }
 for (File file : entry.cleanFiles) {
   // A file must have been deleted manually!
   if (!file.exists()) {
     return null;
   }
 }
 redundantOpCount++;
 journalWriter.append(READ);
 journalWriter.append(' ');
 journalWriter.append(key);
 journalWriter.append('\n');
 if (journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
 }
 return new Value(key, entry.sequenceNumber, entry.cleanFiles, entry.lengths);
}
origin: com.github.bumptech.glide/disklrucache

/**
 * Returns a snapshot of the entry named {@code key}, or null if it doesn't
 * exist is not currently readable. If a value is returned, it is moved to
 * the head of the LRU queue.
 */
public synchronized Value get(String key) throws IOException {
 checkNotClosed();
 Entry entry = lruEntries.get(key);
 if (entry == null) {
  return null;
 }
 if (!entry.readable) {
  return null;
 }
 for (File file : entry.cleanFiles) {
   // A file must have been deleted manually!
   if (!file.exists()) {
     return null;
   }
 }
 redundantOpCount++;
 journalWriter.append(READ);
 journalWriter.append(' ');
 journalWriter.append(key);
 journalWriter.append('\n');
 if (journalRebuildRequired()) {
  executorService.submit(cleanupCallable);
 }
 return new Value(key, entry.sequenceNumber, entry.cleanFiles, entry.lengths);
}
com.bumptech.glide.disklrucacheDiskLruCache$Value<init>

Popular methods of DiskLruCache$Value

  • getFile
  • getString
    Returns the string value for index.
  • edit
    Returns an editor for this snapshot's entry, or null if either the entry has changed since this snap
  • getLength
    Returns the byte length of the value for index.

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now