Codota Logo
DhtReader.getRecentChunks
Code IndexAdd Codota to your IDE (free)

How to use
getRecentChunks
method
in
org.eclipse.jgit.storage.dht.DhtReader

Best Java code snippets using org.eclipse.jgit.storage.dht.DhtReader.getRecentChunks (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: com.madgag/org.eclipse.jgit.storage.dht

@Override
public void release() {
  reader.getRecentChunks().setMaxBytes(reader.getOptions().getChunkLimit());
  prefetcher = null;
  currChunk = null;
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

@Override
public void release() {
  reader.getRecentChunks().setMaxBytes(reader.getOptions().getChunkLimit());
  prefetcher = null;
  currChunk = null;
}
origin: com.madgag/org.eclipse.jgit.storage.dht

  private void init() throws IOException {
    ObjectWithInfo<T> c;

    while ((c = nextObjectWithInfo()) != null) {
      ChunkKey chunkKey = c.chunkKey;
      Collection<ObjectWithInfo<T>> list = byChunk.get(chunkKey);
      if (list == null) {
        list = new ArrayList<ObjectWithInfo<T>>();
        byChunk.put(chunkKey, list);

        if (prefetcher == null) {
          int limit = reader.getOptions().getChunkLimit();
          int ratio = reader.getOptions().getOpenQueuePrefetchRatio();
          int prefetchLimit = (int) (limit * (ratio / 100.0));
          reader.getRecentChunks().setMaxBytes(limit - prefetchLimit);
          prefetcher = new Prefetcher(reader, 0, prefetchLimit);
        }
        prefetcher.push(chunkKey);
      }
      list.add(c);
    }

    chunkItr = byChunk.values().iterator();
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

  private void init() throws IOException {
    ObjectWithInfo<T> c;

    while ((c = nextObjectWithInfo()) != null) {
      ChunkKey chunkKey = c.chunkKey;
      Collection<ObjectWithInfo<T>> list = byChunk.get(chunkKey);
      if (list == null) {
        list = new ArrayList<ObjectWithInfo<T>>();
        byChunk.put(chunkKey, list);

        if (prefetcher == null) {
          int limit = reader.getOptions().getChunkLimit();
          int ratio = reader.getOptions().getOpenQueuePrefetchRatio();
          int prefetchLimit = (int) (limit * (ratio / 100.0));
          reader.getRecentChunks().setMaxBytes(limit - prefetchLimit);
          prefetcher = new Prefetcher(reader, 0, prefetchLimit);
        }
        prefetcher.push(chunkKey);
      }
      list.add(c);
    }

    chunkItr = byChunk.values().iterator();
  }
}
origin: com.madgag/org.eclipse.jgit.storage.dht

void copyAsIs(PackOutputStream out, boolean validate, DhtReader ctx)
    throws IOException {
  if (keyList == null)
    init();
  // Clear the recent chunks because all of the reader's
  // chunk limit should be made available for prefetch.
  int cacheLimit = ctx.getOptions().getChunkLimit();
  ctx.getRecentChunks().setMaxBytes(0);
  try {
    Prefetcher p = new Prefetcher(ctx, 0, cacheLimit);
    p.push(Arrays.asList(keyList));
    copyPack(out, p, validate);
  } finally {
    ctx.getRecentChunks().setMaxBytes(cacheLimit);
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

void copyAsIs(PackOutputStream out, boolean validate, DhtReader ctx)
    throws IOException {
  if (keyList == null)
    init();
  // Clear the recent chunks because all of the reader's
  // chunk limit should be made available for prefetch.
  int cacheLimit = ctx.getOptions().getChunkLimit();
  ctx.getRecentChunks().setMaxBytes(0);
  try {
    Prefetcher p = new Prefetcher(ctx, 0, cacheLimit);
    p.push(Arrays.asList(keyList));
    copyPack(out, p, validate);
  } finally {
    ctx.getRecentChunks().setMaxBytes(cacheLimit);
  }
}
org.eclipse.jgit.storage.dhtDhtReadergetRecentChunks

Popular methods of DhtReader

  • <init>
  • endPrefetch
  • find
  • findChunk
  • getChunk
  • getChunkGently
  • getDatabase
  • getDeltaBaseCache
  • getInserterOptions
  • getOptions
  • getRecentInfoCache
  • getRepositoryKey
  • getRecentInfoCache,
  • getRepositoryKey,
  • getStatistics,
  • inflater,
  • load,
  • missing,
  • prefetch,
  • recentChunk

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • orElseThrow (Optional)
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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