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(); }
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(); }
BatchObjectLookup(DhtReader reader, ProgressMonitor monitor) { this.repo = reader.getRepositoryKey(); this.db = reader.getDatabase(); this.reader = reader; if (monitor != null && monitor != NullProgressMonitor.INSTANCE) this.progress = new ThreadSafeProgressMonitor(monitor); else this.progress = null; this.concurrentBatches = reader.getOptions() .getObjectIndexConcurrentBatches(); this.batches = new Semaphore(concurrentBatches); this.resultLock = new ReentrantLock(); this.error = new AtomicReference<DhtException>(); this.retry = new ArrayList<T>(); this.tmp = new ArrayList<ObjectInfo>(4); }
BatchObjectLookup(DhtReader reader, ProgressMonitor monitor) { this.repo = reader.getRepositoryKey(); this.db = reader.getDatabase(); this.reader = reader; if (monitor != null && monitor != NullProgressMonitor.INSTANCE) this.progress = new ThreadSafeProgressMonitor(monitor); else this.progress = null; this.concurrentBatches = reader.getOptions() .getObjectIndexConcurrentBatches(); this.batches = new Semaphore(concurrentBatches); this.resultLock = new ReentrantLock(); this.error = new AtomicReference<DhtException>(); this.retry = new ArrayList<T>(); this.tmp = new ArrayList<ObjectInfo>(4); }
toFind.add(ObjectIndexKey.create(ctx.getRepositoryKey(), start)); toFind.add(ObjectIndexKey.create(ctx.getRepositoryKey(), end)); db.objectIndex().get(Context.READ_REPAIR, toFind, sync);
toFind.add(ObjectIndexKey.create(ctx.getRepositoryKey(), start)); toFind.add(ObjectIndexKey.create(ctx.getRepositoryKey(), end)); db.objectIndex().get(Context.READ_REPAIR, toFind, sync);