[Jiemamy-notify] commit [2149] 参照キュー監視スレッドをフィールドに持つ必要はないのでリファクタ。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 11月 16日 (日) 00:58:59 JST


Revision: 2149
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=2149
Author:   ewigkeit1204
Date:     2008-11-16 00:58:59 +0900 (Sun, 16 Nov 2008)

Log Message:
-----------
参照キュー監視スレッドをフィールドに持つ必要はないのでリファクタ。
あと、ログ出力文字列の文法ミスを修正。

Modified Paths:
--------------
    artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/ReferenceQueueMonitor.java
    artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/Swapper.java


-------------- next part --------------
Modified: artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/ReferenceQueueMonitor.java
===================================================================
--- artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/ReferenceQueueMonitor.java	2008-11-15 15:29:39 UTC (rev 2148)
+++ artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/ReferenceQueueMonitor.java	2008-11-15 15:58:59 UTC (rev 2149)
@@ -76,7 +76,7 @@
 				}
 			} catch (InterruptedException e) {
 				// スレッド停止
-				logger.info("Shutting down because throwing InterruptedException.", e);
+				logger.info("Shutting down because InterruptedException thrown.", e);
 				running = false;
 			}
 		}

Modified: artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/Swapper.java
===================================================================
--- artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/Swapper.java	2008-11-15 15:29:39 UTC (rev 2148)
+++ artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/serializer/swap/Swapper.java	2008-11-15 15:58:59 UTC (rev 2149)
@@ -70,9 +70,6 @@
 	/** スワップ情報参照キュー */
 	ReferenceQueue<SwapObject<?>> swapRefQueue;
 	
-	/** スワップ情報参照キュー監視スレッド */
-	ReferenceQueueMonitor<SwapObject<?>> swapRefQueueMonitor;
-	
 
 	/**
 	 * コンストラクタ。
@@ -91,10 +88,12 @@
 		
 		swapRefSet = new TreeSet<Reference<SwapObject<?>>>(new SetComparator());
 		swapRefQueue = new ReferenceQueue<SwapObject<?>>();
-		swapRefQueueMonitor = new ReferenceQueueMonitor<SwapObject<?>>(swapRefQueue);
-		swapRefQueueMonitor.addReferenceListener(this);
 		
-		Thread t = new Thread(swapRefQueueMonitor, "SwapObjectReferenceQueueMonitor");
+		// 参照キュー監視スレッドの生成
+		ReferenceQueueMonitor<SwapObject<?>> monitor = new ReferenceQueueMonitor<SwapObject<?>>(swapRefQueue);
+		monitor.addReferenceListener(this);
+		
+		Thread t = new Thread(monitor, "SwapObjectReferenceQueueMonitor");
 		t.setDaemon(true);
 		t.start();
 	}


Jiemamy-notify メーリングリストの案内
Back to archive index