lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r496166 - /lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java
Date Sun, 14 Jan 2007 22:13:05 GMT
Author: mikemccand
Date: Sun Jan 14 14:13:04 2007
New Revision: 496166

URL: http://svn.apache.org/viewvc?view=rev&rev=496166
Log:
LUCENE-776: just clarifying comment on the private DIRECTORIES cache in FSDirectory

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java?view=diff&rev=496166&r1=496165&r2=496166
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java Sun Jan 14 14:13:04
2007
@@ -47,10 +47,11 @@
     
   /** This cache of directories ensures that there is a unique Directory
    * instance per path, so that synchronization on the Directory can be used to
-   * synchronize access between readers and writers.
-   *
-   * This should be a WeakHashMap, so that entries can be GC'd, but that would
-   * require Java 1.2.  Instead we use refcounts...
+   * synchronize access between readers and writers.  We use
+   * refcounts to ensure when the last use of an FSDirectory
+   * instance for a given canonical path is closed, we remove the
+   * instance from the cache.  See LUCENE-776
+   * for some relevant discussion.
    */
   private static final Hashtable DIRECTORIES = new Hashtable();
 



Mime
View raw message