/** * @param metadataCache the cache to be used for all smaller metadata: prefer replication over distribution, avoid eviction * @param chunksCache the cache to use for the space consuming segments: prefer distribution, enable eviction if needed * @param distLocksCache the cache to use for locks, to avoid more than one process to write to the index * @param indexName the unique index name, useful to store multiple indexes in the same caches * @param lf the LockFactory to be used by IndexWriters. @see org.infinispan.lucene.locking * @param chunkSize segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for distribution and network replication * @param readLocker @see org.infinispan.lucene.readlocks for some implementations; you might be able to provide more efficient implementations by controlling the IndexReader's lifecycle. * @param fileListUpdatedAsync When true, the writes to the list of currently existing files in the Directory will use the putAsync method rather than put. * @param deleteExecutor The Executor to run file deletes in the background * @param affinitySegmentId A hint interpreted by the consistent hashing function to force locality with a specific segment identifier */ public DirectoryLucene(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName, LockFactory lf, int chunkSize, SegmentReadLocker readLocker, boolean fileListUpdatedAsync, Executor deleteExecutor, int affinitySegmentId) { this.deleteExecutor = deleteExecutor; this.affinitySegmentId = affinitySegmentId; this.impl = new DirectoryImplementor(metadataCache, chunksCache, distLocksCache, indexName, chunkSize, readLocker, fileListUpdatedAsync, affinitySegmentId); this.indexName = indexName; this.lockFactory = lf; }
/** * @param metadataCache the cache to be used for all smaller metadata: prefer replication over distribution, avoid eviction * @param chunksCache the cache to use for the space consuming segments: prefer distribution, enable eviction if needed * @param distLocksCache the cache to use for locks, to avoid more than one process to write to the index * @param indexName the unique index name, useful to store multiple indexes in the same caches * @param lf the LockFactory to be used by IndexWriters. @see org.infinispan.lucene.locking * @param chunkSize segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for distribution and network replication * @param readLocker @see org.infinispan.lucene.readlocks for some implementations; you might be able to provide more efficient implementations by controlling the IndexReader's lifecycle. * @param fileListUpdatedAsync When true, the writes to the list of currently existing files in the Directory will use the putAsync method rather than put. * @param deleteExecutor The Executor to run file deletes in the background * @param affinitySegmentId A hint interpreted by the consistent hashing function to force locality with a specific segment identifier */ public DirectoryLucene(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName, LockFactory lf, int chunkSize, SegmentReadLocker readLocker, boolean fileListUpdatedAsync, Executor deleteExecutor, int affinitySegmentId) { this.deleteExecutor = deleteExecutor; this.affinitySegmentId = affinitySegmentId; this.impl = new DirectoryImplementor(metadataCache, chunksCache, distLocksCache, indexName, chunkSize, readLocker, fileListUpdatedAsync, affinitySegmentId); this.indexName = indexName; this.lockFactory = lf; }
DirectoryLuceneV3(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, String indexName, LockFactory lf, int chunkSize, SegmentReadLocker readLocker) { this.impl = new DirectoryImplementor(metadataCache, chunksCache, indexName, chunkSize, readLocker); this.indexName = indexName; this.lockFactory = lf; this.lockFactory.setLockPrefix(this.getLockID()); }
/** * @param metadataCache the cache to be used for all smaller metadata: prefer replication over distribution, avoid eviction * @param chunksCache the cache to use for the space consuming segments: prefer distribution, enable eviction if needed * @param indexName the unique index name, useful to store multiple indexes in the same caches * @param lf the LockFactory to be used by IndexWriters. @see org.infinispan.lucene.locking * @param chunkSize segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for distribution and network replication * @param readLocker @see org.infinispan.lucene.readlocks for some implementations; you might be able to provide more efficient implementations by controlling the IndexReader's lifecycle. */ public DirectoryLuceneV4(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, String indexName, LockFactory lf, int chunkSize, SegmentReadLocker readLocker) { this.impl = new DirectoryImplementor(metadataCache, chunksCache, indexName, chunkSize, readLocker); this.indexName = indexName; this.lockFactory = lf; this.lockFactory.setLockPrefix(this.getLockID()); }