Codota Logo
LoadingCache.getUnchecked
Code IndexAdd Codota to your IDE (free)

How to use
getUnchecked
method
in
com.nytimes.android.external.cache.LoadingCache

Best Java code snippets using com.nytimes.android.external.cache.LoadingCache.getUnchecked (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: com.nytimes.android/cache

@Override
public V getUnchecked(K key) {
  return autoDelegate.getUnchecked(key);
}
origin: com.nytimes.android/filesystem

@Nullable
private FSFile getFile(@Nonnull String path) {
  return files.getUnchecked(cleanPath(path));
}
origin: com.nytimes.android/filesystem

  @Nonnull
  private Collection<FSFile> findFiles(@Nonnull String path) throws FileNotFoundException {
    File searchRoot = new File(root, util.simplifyPath(path));
    if (searchRoot.exists() && searchRoot.isFile()) {
      throw new FileNotFoundException(format("expecting a directory at %s, instead found a file", path));
    }

    Collection<FSFile> foundFiles = new ArrayList<>();
    BreadthFirstFileTreeIterator iterator = new BreadthFirstFileTreeIterator(searchRoot);
    while (iterator.hasNext()) {
      File file = (File) iterator.next();
      foundFiles.add(files.getUnchecked(util.simplifyPath(file.getPath()
          .replaceFirst(root.getPath(), ""))));
    }
    return foundFiles;
  }
}
com.nytimes.android.external.cacheLoadingCachegetUnchecked

Javadoc

Returns the value associated with key in this cache, first loading that value if necessary. No observable state associated with this cache is modified until loading completes. Unlike #get, this method does not throw a checked exception, and thus should only be used in situations where checked exceptions are not thrown by the cache loader.

If another call to #get or #getUnchecked is currently loading the value for key, simply waits for that thread to finish and returns its loaded value. Note that multiple threads can concurrently load values for distinct keys.

Caches loaded by a CacheLoader will call CacheLoader#load to load new values into the cache. Newly loaded values are added to the cache using Cache.asMap().putIfAbsent after loading has completed; if another value was associated with key while the new value was loading then a removal notification will be sent for the new value.

Warning: this method silently converts checked exceptions to unchecked exceptions, and should not be used with cache loaders which throw checked exceptions. In such cases use #get instead.

Popular methods of LoadingCache

  • apply
  • get
    Returns the value associated with key in this cache, first loading that value if necessary. No obser
  • getAll
    Returns a map of the values associated with keys, creating or retrieving those values if necessary.
  • refresh
    Loads a new value for key key, possibly asynchronously. While the new value is loading the previous

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
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