public class DirectoryBuilderImpl extends Object implements BuildContext
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
Used as default chunk size: each Lucene index segment is split into smaller parts having a default size in bytes
as defined here
|
| Constructor and Description |
|---|
DirectoryBuilderImpl(Cache<?,?> metadataCache,
Cache<?,?> chunksCache,
Cache<?,?> distLocksCache,
String indexName) |
| Modifier and Type | Method and Description |
|---|---|
BuildContext |
affinityLocationIntoSegment(int segmentId)
When set to a positive integer, this will force a specific data distribution:
the hashing function will resolve all keys used to store the various entries
for the resulting index to be owned by the specified segment id.
|
BuildContext |
chunkSize(int bytes)
Sets the chunkSize option for the Directory being created.
|
org.apache.lucene.store.Directory |
create()
Creates a Directory instance
|
BuildContext |
deleteOperationsExecutor(Executor executor)
Provides an Executor to handle delete operations in a background thread
|
BuildContext |
overrideSegmentReadLocker(SegmentReadLocker srl)
Overrides the default SegmentReadLocker.
|
BuildContext |
overrideWriteLocker(org.apache.lucene.store.LockFactory lockFactory)
Overrides the IndexWriter LockFactory
|
BuildContext |
writeFileListAsynchronously(boolean writeFileListAsync)
When set to true, the list of files of the Directory is propagated to other nodes
asynchronously.
|
public static final int DEFAULT_BUFFER_SIZE
public org.apache.lucene.store.Directory create()
BuildContextcreate in interface BuildContextDirectorypublic BuildContext chunkSize(int bytes)
BuildContextchunkSize in interface BuildContextbytes - segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for
distribution and network replicationpublic BuildContext overrideSegmentReadLocker(SegmentReadLocker srl)
BuildContextoverrideSegmentReadLocker in interface BuildContextsrl - the new read locking strategy for fragmented segmentsorg.infinispan.lucene.readlockspublic BuildContext affinityLocationIntoSegment(int segmentId)
BuildContextaffinityLocationIntoSegment in interface BuildContextpublic BuildContext writeFileListAsynchronously(boolean writeFileListAsync)
BuildContextwriteFileListAsynchronously in interface BuildContextpublic BuildContext deleteOperationsExecutor(Executor executor)
BuildContextdeleteOperationsExecutor in interface BuildContextpublic BuildContext overrideWriteLocker(org.apache.lucene.store.LockFactory lockFactory)
BuildContextoverrideWriteLocker in interface BuildContextlockFactory - the LockFactory to be used by IndexWriters.org.infinispan.lucene.lockingCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.