jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r1330395 - /jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
Date Wed, 25 Apr 2012 16:26:40 GMT
Author: dpfister
Date: Wed Apr 25 16:26:39 2012
New Revision: 1330395

URL: http://svn.apache.org/viewvc?rev=1330395&view=rev
Log:
GC for revisions
- give scheduled GC thread a more descriptive name

Modified:
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java?rev=1330395&r1=1330394&r2=1330395&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
Wed Apr 25 16:26:39 2012
@@ -23,6 +23,7 @@ import java.util.Map;
 import java.util.WeakHashMap;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
@@ -127,7 +128,13 @@ public class DefaultRevisionStore extend
         }
 
         if (gcpm != null) {
-            gcExecutor = Executors.newScheduledThreadPool(1);
+            gcExecutor = Executors.newScheduledThreadPool(1,
+                    new ThreadFactory() {
+                        @Override
+                        public Thread newThread(Runnable r) {
+                            return new Thread(r, "RevisionStore-GC");
+                        }
+                    });
             gcExecutor.scheduleWithFixedDelay(new Runnable() {
                 @Override
                 public void run() {
@@ -140,7 +147,7 @@ public class DefaultRevisionStore extend
 
         initialized = true;
     }
-
+    
     public void close() {
         verifyInitialized();
 



Mime
View raw message