org.infinispan.lucene.impl
Class DirectoryBuilderImpl

java.lang.Object
  extended by org.infinispan.lucene.impl.DirectoryBuilderImpl
All Implemented Interfaces:
BuildContext

public class DirectoryBuilderImpl
extends Object
implements BuildContext


Field Summary
static int DEFAULT_BUFFER_SIZE
          Used as default chunk size: each Lucene index segment is splitted into smaller parts having a default size in bytes as defined here
 
Constructor Summary
DirectoryBuilderImpl(Cache<?,?> metadataCache, Cache<?,?> chunksCache, Cache<?,?> distLocksCache, String indexName)
           
 
Method Summary
 BuildContext chunkSize(int bytes)
          Sets the chunkSize option for the Directory being created.
 org.apache.lucene.store.Directory create()
          Creates a Directory instance
 BuildContext overrideSegmentReadLocker(SegmentReadLocker srl)
          Overrides the default SegmentReadLocker.
 BuildContext overrideWriteLocker(org.apache.lucene.store.LockFactory lockFactory)
          Overrides the IndexWriter LockFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
Used as default chunk size: each Lucene index segment is splitted into smaller parts having a default size in bytes as defined here

See Also:
Constant Field Values
Constructor Detail

DirectoryBuilderImpl

public DirectoryBuilderImpl(Cache<?,?> metadataCache,
                            Cache<?,?> chunksCache,
                            Cache<?,?> distLocksCache,
                            String indexName)
Method Detail

create

public org.apache.lucene.store.Directory create()
Description copied from interface: BuildContext
Creates a Directory instance

Specified by:
create in interface BuildContext
Returns:
the new Directory
See Also:
Directory

chunkSize

public BuildContext chunkSize(int bytes)
Description copied from interface: BuildContext
Sets the chunkSize option for the Directory being created.

Specified by:
chunkSize in interface BuildContext
Parameters:
bytes - segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for distribution and network replication
Returns:
the same building context to eventually create the Directory instance

overrideSegmentReadLocker

public BuildContext overrideSegmentReadLocker(SegmentReadLocker srl)
Description copied from interface: BuildContext
Overrides the default SegmentReadLocker. In some cases you might be able to provide more efficient implementations than the default one by controlling the IndexReader's lifecycle

Specified by:
overrideSegmentReadLocker in interface BuildContext
Parameters:
srl - the new read locking strategy for fragmented segments
Returns:
the same building context to eventually create the Directory instance
See Also:
org.infinispan.lucene.readlocks

overrideWriteLocker

public BuildContext overrideWriteLocker(org.apache.lucene.store.LockFactory lockFactory)
Description copied from interface: BuildContext
Overrides the IndexWriter LockFactory

Specified by:
overrideWriteLocker in interface BuildContext
Parameters:
lockFactory - the LockFactory to be used by IndexWriters.
Returns:
the same building context to eventually create the Directory instance
See Also:
org.infinispan.lucene.locking

-->

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.