[jboss-cvs] JBoss Messaging SVN: r4272 - trunk/src/main/org/jboss/messaging/core/journal/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 21 11:35:56 EDT 2008


Author: timfox
Date: 2008-05-21 11:35:56 -0400 (Wed, 21 May 2008)
New Revision: 4272

Modified:
   trunk/src/main/org/jboss/messaging/core/journal/impl/JournalImpl.java
Log:
Make members private


Modified: trunk/src/main/org/jboss/messaging/core/journal/impl/JournalImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/journal/impl/JournalImpl.java	2008-05-21 14:08:17 UTC (rev 4271)
+++ trunk/src/main/org/jboss/messaging/core/journal/impl/JournalImpl.java	2008-05-21 15:35:56 UTC (rev 4272)
@@ -40,6 +40,7 @@
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -166,13 +167,8 @@
 	
 	private final boolean shouldUseCallback;
 	
-   /**
-    * single thread... will shutdown the thread after 60 seconds
-    */ 
-	private ExecutorService closingExecutor = new ThreadPoolExecutor(1, 1, 60L,
-         TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());;
-   
-		
+	private final ExecutorService closingExecutor = Executors.newSingleThreadExecutor();
+   		
 	/*
     * We use a semaphore rather than synchronized since it performs better when
     * contended
@@ -1552,9 +1548,11 @@
 
    private static class SimpleCallback implements IOCallback
    {      
-      String errorMessage;
-      int errorCode;
-      CountDownLatch latch = new CountDownLatch(1);
+      private String errorMessage;
+      
+      private int errorCode;
+      
+      private CountDownLatch latch = new CountDownLatch(1);
 
       public void done()
       {
@@ -1584,11 +1582,12 @@
    
    private static class TransactionCallback implements IOCallback
    {      
-      VariableLatch countLatch = new VariableLatch();
+      private final VariableLatch countLatch = new VariableLatch();
       
-      String errorMessage = null;
-      int errorCode = 0;
+      private String errorMessage = null;
       
+      private int errorCode = 0;
+      
       public void countUp()
       {
          countLatch.up();




More information about the jboss-cvs-commits mailing list