congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CacheChunkTable$MetaFromDatabase.copy
Code IndexAdd Tabnine to your IDE (free)

How to use
copy
method
in
org.eclipse.jgit.storage.dht.spi.cache.CacheChunkTable$MetaFromDatabase

Best Java code snippets using org.eclipse.jgit.storage.dht.spi.cache.CacheChunkTable$MetaFromDatabase.copy (Showing top 2 results out of 315)

origin: com.madgag/org.eclipse.jgit.storage.dht

public void onPartialResult(Map<ChunkKey, ChunkMeta> result) {
  final Map<ChunkKey, ChunkMeta> toPutIntoCache = copy(result);
  if (streamingCallback != null)
    streamingCallback.onPartialResult(result);
  else {
    synchronized (lock) {
      all.putAll(result);
    }
  }
  // Encoding is rather expensive, so move the cache population
  // into it a different background thread to prevent the current
  // database task from being starved of time.
  //
  executor.submit(new Runnable() {
    public void run() {
      for (Map.Entry<ChunkKey, ChunkMeta> ent
          : toPutIntoCache.entrySet()) {
        ChunkKey key = ent.getKey();
        Change op = Change.put(nsMeta.key(key),
            ent.getValue().toByteArray());
        client.modify(singleton(op), none);
      }
    }
  });
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

public void onPartialResult(Map<ChunkKey, ChunkMeta> result) {
  final Map<ChunkKey, ChunkMeta> toPutIntoCache = copy(result);
  if (streamingCallback != null)
    streamingCallback.onPartialResult(result);
  else {
    synchronized (lock) {
      all.putAll(result);
    }
  }
  // Encoding is rather expensive, so move the cache population
  // into it a different background thread to prevent the current
  // database task from being starved of time.
  //
  executor.submit(new Runnable() {
    public void run() {
      for (Map.Entry<ChunkKey, ChunkMeta> ent
          : toPutIntoCache.entrySet()) {
        ChunkKey key = ent.getKey();
        Change op = Change.put(nsMeta.key(key),
            ent.getValue().toByteArray());
        client.modify(singleton(op), none);
      }
    }
  });
}
org.eclipse.jgit.storage.dht.spi.cacheCacheChunkTable$MetaFromDatabasecopy

Popular methods of CacheChunkTable$MetaFromDatabase

  • <init>
  • onPartialResult

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Collectors (java.util.stream)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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