svn commit: r513130 - /xml/xindice/trunk/java/src/org/apache/xindice/core/filer/BTree.java

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: vgritsenko
Date: Wed Feb 28 20:09:11 2007
New Revision: 513130

URL: http://svn.apache.org/viewvc?view=rev&rev=513130
Log:
javadoc

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/core/filer/BTree.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/filer/BTree.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/filer/BTree.java?view=diff&rev=513130&r1=513129&r2=513130
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/filer/BTree.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/filer/BTree.java Wed Feb 28 20:09:11 2007
@@ -42,8 +42,8 @@
 /**
  * BTree represents a Variable Magnitude Simple-Prefix B+Tree File.
  * A BTree is a bit flexible in that it can be used for set or
- * map-based indexing.  HashFiler uses the BTree as a set for
- * producing RecordSet entries.  The Indexers use BTree as a map for
+ * map-based indexing. {@link BTreeFiler} uses the BTree as a set for
+ * producing RecordSet entries. The Indexers use BTree as a map for
  * indexing entity and attribute values in Documents.
  *
  * <br>
@@ -73,15 +73,21 @@
 
     private static final Log log = LogFactory.getLog(BTree.class);
 
-    protected static final byte LEAF = 1;
+    protected static final byte LEAF   = 1;
     protected static final byte BRANCH = 2;
     protected static final byte STREAM = 3;
 
     /**
-     * Cache of the recently used tree nodes.
+     * Identity map of the recently used tree nodes to ensure that same
+     * node is present in the memory once and only once.
      *
-     * Cache contains weak references to the BTreeNode objects, keys are page numbers (Long objects).
-     * Access synchronized by this map itself.
+     * <p>Cache contains weak references to the BTreeNode objects, keys
+     * are page numbers (Long objects). Access synchronized by this map
+     * object itself.
+     *
+     * <p>This identity map can be made into cache to store nodes for
+     * extended time periods, but that might not be necessary since
+     * documents are cached on the Collection level.
      */
     private final Map cache = new WeakHashMap();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.