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()
BuildContext
create
in interface BuildContext
Directory
public BuildContext chunkSize(int bytes)
BuildContext
chunkSize
in interface BuildContext
bytes
- segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for
distribution and network replicationpublic BuildContext overrideSegmentReadLocker(SegmentReadLocker srl)
BuildContext
overrideSegmentReadLocker
in interface BuildContext
srl
- the new read locking strategy for fragmented segmentsorg.infinispan.lucene.readlocks
public BuildContext affinityLocationIntoSegment(int segmentId)
BuildContext
affinityLocationIntoSegment
in interface BuildContext
public BuildContext writeFileListAsynchronously(boolean writeFileListAsync)
BuildContext
writeFileListAsynchronously
in interface BuildContext
public BuildContext deleteOperationsExecutor(Executor executor)
BuildContext
deleteOperationsExecutor
in interface BuildContext
public BuildContext overrideWriteLocker(org.apache.lucene.store.LockFactory lockFactory)
BuildContext
overrideWriteLocker
in interface BuildContext
lockFactory
- the LockFactory to be used by IndexWriters.org.infinispan.lucene.locking
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.