You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by mi...@apache.org on 2007/01/01 15:06:27 UTC

svn commit: r491574 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/store/RAMDirectory.java

Author: mikemccand
Date: Mon Jan  1 06:06:26 2007
New Revision: 491574

URL: http://svn.apache.org/viewvc?view=rev&rev=491574
Log:
LUCENE-758: fix javadocs to clarify that RAMDirectory(Directory) makes a full copy of the original Directory

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?view=diff&rev=491574&r1=491573&r2=491574
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Mon Jan  1 06:06:26 2007
@@ -382,6 +382,9 @@
 
   9. Added some text about what is contained in releases.  (Eric Haszlakiewicz via Grant Ingersoll)
 
+  10. LUCENE-758: Fix javadoc to clarify that RAMDirectory(Directory)
+      makes a full copy of the starting Directory.  (Mike McCandless)
+
 Build
 
   1. Added in clover test code coverage per http://issues.apache.org/jira/browse/LUCENE-721  To enable clover code coverage, you must have clover.jar in the ANT classpath and specify -Drun.clover=true on the command line.(Michael Busch and Grant Ingersoll)

Modified: lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java?view=diff&rev=491574&r1=491573&r2=491574
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java Mon Jan  1 06:06:26 2007
@@ -58,6 +58,12 @@
    * a disk-based index into memory.
    * <P>
    * This should be used only with indices that can fit into memory.
+   * <P>
+   * Note that the resulting <code>RAMDirectory</code> instance is fully
+   * independent from the original <code>Directory</code> (it is a
+   * complete copy).  Any subsequent changes to the
+   * original <code>Directory</code> will not be visible in the
+   * <code>RAMDirectory</code> instance.
    *
    * @param dir a <code>Directory</code> value
    * @exception IOException if an error occurs
@@ -97,6 +103,8 @@
    * Creates a new <code>RAMDirectory</code> instance from the {@link FSDirectory}.
    *
    * @param dir a <code>File</code> specifying the index directory
+   *
+   * @see #RAMDirectory(Directory)
    */
   public RAMDirectory(File dir) throws IOException {
     this(FSDirectory.getDirectory(dir, false), true);
@@ -106,6 +114,8 @@
    * Creates a new <code>RAMDirectory</code> instance from the {@link FSDirectory}.
    *
    * @param dir a <code>String</code> specifying the full index directory path
+   *
+   * @see #RAMDirectory(Directory)
    */
   public RAMDirectory(String dir) throws IOException {
     this(FSDirectory.getDirectory(dir, false), true);