jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r604881 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
Date Mon, 17 Dec 2007 14:33:36 GMT
Author: thomasm
Date: Mon Dec 17 06:33:35 2007
New Revision: 604881

URL: http://svn.apache.org/viewvc?rev=604881&view=rev
Log:
JCR-1138 Data store garbage collection: improved documentation

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java?rev=604881&r1=604880&r2=604881&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
Mon Dec 17 06:33:35 2007
@@ -56,7 +56,14 @@
  * this achieved by updating the modified date of the entries. Newly added
  * entries are detected because the modified date is changed when they are
  * added.
- * 
+ * <p>
+ * Example code to run the data store garbage collection:
+ * <pre>
+ * GarbageCollector gc = ((SessionImpl)session).createDataStoreGarbageCollector();
+ * gc.scan();
+ * gc.stopScan();
+ * gc.deleteUnused();
+ * </pre>
  */
 public class GarbageCollector {
 
@@ -124,7 +131,10 @@
     }
 
     /**
-     * Scan the repository.
+     * Scan the repository. The garbage collector will iterate over all nodes in the repository

+     * and update the last modified date. If all persistence managers implement the 
+     * IterablePersistenceManager interface, this mechanism will be used; if not, the garbage

+     * collector will scan the repository using the JCR API starting from the root node.
      * 
      * @throws RepositoryException
      * @throws IllegalStateException



Mime
View raw message