Skip to content

Apache Lucene open-source search software

SOLR-2187: Add support for directly instantiating MMapDirectory, SimpleFSDirectory

Grant Ingersoll16c09f48abf0
diff --git a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java b/lucene/src/java/org/apache/lucene/store/MMapDirectory.java
index 4e25766ac41..c0362a56164 100644
--- a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java
+++ b/lucene/src/java/org/apache/lucene/store/MMapDirectory.java
@@ -79,7 +79,8 @@ import org.apache.lucene.util.Constants;
*/
public class MMapDirectory extends FSDirectory {
private boolean useUnmapHack = UNMAP_SUPPORTED;
- private int maxBBuf = Constants.JRE_IS_64BIT ? Integer.MAX_VALUE : (256 * 1024 * 1024);
+ public static final int DEFAULT_MAX_BUFF = Constants.JRE_IS_64BIT ? Integer.MAX_VALUE : (256 * 1024 * 1024);
+ private int maxBBuf = DEFAULT_MAX_BUFF;
/** Create a new MMapDirectory for the named location.
*