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

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

Best Java code snippets using org.eclipse.jgit.storage.dht.DhtReader.getOptions (Showing top 20 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

ObjectWriter(DhtReader ctx, Prefetcher prefetch) {
  this.ctx = ctx;
  this.prefetch = prefetch;
  batchSize = ctx.getOptions().getObjectIndexBatchSize();
  metaBatches = new Semaphore(batchSize);
  metaError = new AtomicReference<DhtException>();
  allVisits = new LinkedHashMap<ChunkKey, Integer>();
  allMeta = new HashMap<ChunkKey, ChunkMeta>();
  metaMissing = new HashSet<ChunkKey>();
  metaToRead = new HashSet<ChunkKey>();
  curVisit = 1;
}
origin: com.madgag/org.eclipse.jgit.storage.dht

ObjectWriter(DhtReader ctx, Prefetcher prefetch) {
  this.ctx = ctx;
  this.prefetch = prefetch;
  batchSize = ctx.getOptions().getObjectIndexBatchSize();
  metaBatches = new Semaphore(batchSize);
  metaError = new AtomicReference<DhtException>();
  allVisits = new LinkedHashMap<ChunkKey, Integer>();
  allMeta = new HashMap<ChunkKey, ChunkMeta>();
  metaMissing = new HashSet<ChunkKey>();
  metaToRead = new HashSet<ChunkKey>();
  curVisit = 1;
}
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: 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

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

QueueObjectLookup(DhtReader reader, boolean reportMissing) {
  this.repo = reader.getRepositoryKey();
  this.db = reader.getDatabase();
  this.reader = reader;
  this.options = reader.getOptions();
  this.reportMissing = reportMissing;
  this.tmp = new ArrayList<ObjectInfo>(4);
  this.context = Context.FAST_MISSING_OK;
  this.toRetry = new ArrayList<T>();
  this.concurrentBatches = options.getObjectIndexConcurrentBatches();
}
origin: com.madgag/org.eclipse.jgit.storage.dht

QueueObjectLookup(DhtReader reader, boolean reportMissing) {
  this.repo = reader.getRepositoryKey();
  this.db = reader.getDatabase();
  this.reader = reader;
  this.options = reader.getOptions();
  this.reportMissing = reportMissing;
  this.tmp = new ArrayList<ObjectInfo>(4);
  this.context = Context.FAST_MISSING_OK;
  this.toRetry = new ArrayList<T>();
  this.concurrentBatches = options.getObjectIndexConcurrentBatches();
}
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

private void awaitPendingBatches() throws InterruptedException,
    DhtTimeoutException, DhtException {
  Timeout to = ctx.getOptions().getTimeout();
  if (!metaBatches.tryAcquire(batchSize, to.getTime(), to.getUnit()))
    throw new DhtTimeoutException(DhtText.get().timeoutChunkMeta);
  if (metaError.get() != null)
    throw metaError.get();
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

private void awaitPendingBatches() throws InterruptedException,
    DhtTimeoutException, DhtException {
  Timeout to = ctx.getOptions().getTimeout();
  if (!metaBatches.tryAcquire(batchSize, to.getTime(), to.getUnit()))
    throw new DhtTimeoutException(DhtText.get().timeoutChunkMeta);
  if (metaError.get() != null)
    throw metaError.get();
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

DeltaBaseCache(DhtReader reader) {
  stats = reader.getStatistics();
  DhtReaderOptions options = reader.getOptions();
  maxByteCount = options.getDeltaBaseCacheLimit();
  table = new Slot[options.getDeltaBaseCacheSize()];
}
origin: org.eclipse.jgit/org.eclipse.jgit.storage.dht

Prefetcher(DhtReader reader, int objectType, int prefetchLimitInBytes) {
  this.db = reader.getDatabase();
  this.stats = reader.getStatistics();
  this.objectType = objectType;
  this.ready = new HashMap<ChunkKey, PackChunk>();
  this.status = new HashMap<ChunkKey, Status>();
  this.queue = new LinkedList<ChunkKey>();
  this.followEdgeHints = reader.getOptions().isPrefetchFollowEdgeHints();
  this.averageChunkSize = reader.getInserterOptions().getChunkSize();
  this.highWaterMark = prefetchLimitInBytes;
  int lwm = (highWaterMark / averageChunkSize) - 4;
  if (lwm <= 0)
    lwm = (highWaterMark / averageChunkSize) / 2;
  lowWaterMark = lwm * averageChunkSize;
}
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

DeltaBaseCache(DhtReader reader) {
  stats = reader.getStatistics();
  DhtReaderOptions options = reader.getOptions();
  maxByteCount = options.getDeltaBaseCacheLimit();
  table = new Slot[options.getDeltaBaseCacheSize()];
}
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

private void startBatch(Context context) throws InterruptedException,
    DhtTimeoutException {
  Timeout to = ctx.getOptions().getTimeout();
  if (!metaBatches.tryAcquire(1, to.getTime(), to.getUnit()))
    throw new DhtTimeoutException(DhtText.get().timeoutChunkMeta);
  Set<ChunkKey> keys = metaToRead;
  ctx.getDatabase().chunk().getMeta(
      context,
      keys,
      new MetaLoader(context, keys));
  metaToRead = new HashSet<ChunkKey>();
}
origin: com.madgag/org.eclipse.jgit.storage.dht

private void startBatch(Context context) throws InterruptedException,
    DhtTimeoutException {
  Timeout to = ctx.getOptions().getTimeout();
  if (!metaBatches.tryAcquire(1, to.getTime(), to.getUnit()))
    throw new DhtTimeoutException(DhtText.get().timeoutChunkMeta);
  Set<ChunkKey> keys = metaToRead;
  ctx.getDatabase().chunk().getMeta(
      context,
      keys,
      new MetaLoader(context, keys));
  metaToRead = new HashSet<ChunkKey>();
}
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

DhtReader(DhtObjDatabase objdb) {
  this.repository = objdb.getRepository();
  this.repo = objdb.getRepository().getRepositoryKey();
  this.db = objdb.getDatabase();
  this.readerOptions = objdb.getReaderOptions();
  this.inserterOptions = objdb.getInserterOptions();
  this.stats = new Statistics();
  this.recentInfo = new RecentInfoCache(getOptions());
  this.recentChunks = new RecentChunks(this);
  this.deltaBaseCache = new DeltaBaseCache(this);
}
origin: com.madgag/org.eclipse.jgit.storage.dht

DhtReader(DhtObjDatabase objdb) {
  this.repository = objdb.getRepository();
  this.repo = objdb.getRepository().getRepositoryKey();
  this.db = objdb.getDatabase();
  this.readerOptions = objdb.getReaderOptions();
  this.inserterOptions = objdb.getInserterOptions();
  this.stats = new Statistics();
  this.recentInfo = new RecentInfoCache(getOptions());
  this.recentChunks = new RecentChunks(this);
  this.deltaBaseCache = new DeltaBaseCache(this);
}
org.eclipse.jgit.storage.dhtDhtReadergetOptions

Popular methods of DhtReader

  • <init>
  • endPrefetch
  • find
  • findChunk
  • getChunk
  • getChunkGently
  • getDatabase
  • getDeltaBaseCache
  • getInserterOptions
  • getRecentChunks
  • 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