Codota Logo
DhtReaderOptions.getChunkLimit
Code IndexAdd Codota to your IDE (free)

How to use
getChunkLimit
method
in
org.eclipse.jgit.storage.dht.DhtReaderOptions

Best Java code snippets using org.eclipse.jgit.storage.dht.DhtReaderOptions.getChunkLimit (Showing top 14 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: org.eclipse.jgit/org.eclipse.jgit.storage.dht

RecentChunks(DhtReader reader) {
  this.reader = reader;
  this.stats = reader.getStatistics();
  this.byKey = new HashMap<ChunkKey, Node>();
  this.maxBytes = reader.getOptions().getChunkLimit();
}
origin: com.madgag/org.eclipse.jgit.storage.dht

RecentChunks(DhtReader reader) {
  this.reader = reader;
  this.stats = reader.getStatistics();
  this.byKey = new HashMap<ChunkKey, Node>();
  this.maxBytes = reader.getOptions().getChunkLimit();
}
origin: com.madgag/org.eclipse.jgit.storage.dht

private Prefetcher prefetch(final int type, final int ratio) {
  int limit = readerOptions.getChunkLimit();
  int prefetchLimit = (int) (limit * (ratio / 100.0));
  recentChunks.setMaxBytes(limit - prefetchLimit);
  return new Prefetcher(this, type, prefetchLimit);
}
origin: com.madgag/org.eclipse.jgit.storage.dht

private void endPrefetch() {
  recentChunks.setMaxBytes(getOptions().getChunkLimit());
  prefetcher = null;
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

private Prefetcher prefetch(final int type, final int ratio) {
  int limit = readerOptions.getChunkLimit();
  int prefetchLimit = (int) (limit * (ratio / 100.0));
  recentChunks.setMaxBytes(limit - prefetchLimit);
  return new Prefetcher(this, type, prefetchLimit);
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

private void endPrefetch() {
  recentChunks.setMaxBytes(getOptions().getChunkLimit());
  prefetcher = null;
}
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);
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

setTimeout(Timeout.getTimeout(rc, "core", "dht", "timeout", getTimeout()));
setPrefetchFollowEdgeHints(rc.getBoolean("core", "dht", "prefetchFollowEdgeHints", isPrefetchFollowEdgeHints()));
setChunkLimit(rc.getInt("core", "dht", "chunkLimit", getChunkLimit()));
setOpenQueuePrefetchRatio(rc.getInt("core", "dht", "openQueuePrefetchRatio", getOpenQueuePrefetchRatio()));
setWalkCommitsPrefetchRatio(rc.getInt("core", "dht", "walkCommitsPrefetchRatio", getWalkCommitsPrefetchRatio()));
origin: com.madgag/org.eclipse.jgit.storage.dht

setTimeout(Timeout.getTimeout(rc, "core", "dht", "timeout", getTimeout()));
setPrefetchFollowEdgeHints(rc.getBoolean("core", "dht", "prefetchFollowEdgeHints", isPrefetchFollowEdgeHints()));
setChunkLimit(rc.getInt("core", "dht", "chunkLimit", getChunkLimit()));
setOpenQueuePrefetchRatio(rc.getInt("core", "dht", "openQueuePrefetchRatio", getOpenQueuePrefetchRatio()));
setWalkCommitsPrefetchRatio(rc.getInt("core", "dht", "walkCommitsPrefetchRatio", getWalkCommitsPrefetchRatio()));
org.eclipse.jgit.storage.dhtDhtReaderOptionsgetChunkLimit

Popular methods of DhtReaderOptions

  • <init>
    Create a default reader configuration.
  • getDeltaBaseCacheLimit
  • getDeltaBaseCacheSize
  • getObjectIndexBatchSize
  • getObjectIndexConcurrentBatches
  • getOpenQueuePrefetchRatio
  • getRecentInfoCacheSize
  • getTimeout
  • getWalkCommitsPrefetchRatio
  • getWalkTreesPrefetchRatio
  • getWriteObjectsPrefetchRatio
  • isPrefetchFollowEdgeHints
  • getWriteObjectsPrefetchRatio,
  • isPrefetchFollowEdgeHints,
  • isTrackFirstChunkLoad,
  • setChunkLimit,
  • setDeltaBaseCacheLimit,
  • setDeltaBaseCacheSize,
  • setObjectIndexBatchSize,
  • setObjectIndexConcurrentBatches,
  • setOpenQueuePrefetchRatio

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • orElseThrow (Optional)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
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