[hornetq-commits] JBoss hornetq SVN: r11907 - in branches/Branch_2_2_EAP: src/main/org/hornetq/core/journal/impl and 3 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Dec 13 14:32:09 EST 2011


Author: clebert.suconic at jboss.com
Date: 2011-12-13 14:32:09 -0500 (Tue, 13 Dec 2011)
New Revision: 11907

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/SequentialFileFactory.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PagingStore.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
   branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
Log:
Just adding logging to print-data/print-pages (no semantic changes on this commit)

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/SequentialFileFactory.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/SequentialFileFactory.java	2011-12-13 18:40:00 UTC (rev 11906)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/SequentialFileFactory.java	2011-12-13 19:32:09 UTC (rev 11907)
@@ -63,6 +63,8 @@
    int getAlignment();
 
    int calculateBlockSize(int bytes);
+   
+   String getDirectory();
 
    void clearBuffer(ByteBuffer buffer);
 

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java	2011-12-13 18:40:00 UTC (rev 11906)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java	2011-12-13 19:32:09 UTC (rev 11907)
@@ -111,6 +111,11 @@
          }
       }
    }
+   
+   public String getDirectory()
+   {
+      return journalDir;
+   }
 
    public void start()
    {

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PagingStore.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PagingStore.java	2011-12-13 18:40:00 UTC (rev 11906)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PagingStore.java	2011-12-13 19:32:09 UTC (rev 11907)
@@ -43,6 +43,8 @@
    int getCurrentWritingPage();
 
    SimpleString getStoreName();
+   
+   String getFolder();
 
    AddressFullMessagePolicy getAddressFullMessagePolicy();
    

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java	2011-12-13 18:40:00 UTC (rev 11906)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java	2011-12-13 19:32:09 UTC (rev 11907)
@@ -105,9 +105,15 @@
 
          for (SimpleString store : stores)
          {
+            PagingStore pgStore = manager.getPageStore(store);
+            String folder = null;
+            
+            if (pgStore != null)
+            {
+               folder = pgStore.getFolder();
+            }
             System.out.println("####################################################################################################");
-            System.out.println("Exploring store " + store);
-            PagingStore pgStore = manager.getPageStore(store);
+            System.out.println("Exploring store " + store + " folder = " + folder);
             int pgid = (int)pgStore.getFirstPage();
             for (int pg = 0; pg < pgStore.getNumberOfPages(); pg++)
             {

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java	2011-12-13 18:40:00 UTC (rev 11906)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java	2011-12-13 19:32:09 UTC (rev 11907)
@@ -269,6 +269,19 @@
    {
       return pageSize;
    }
+   
+   public String getFolder()
+   {
+      SequentialFileFactory factoryUsed = this.fileFactory;
+      if (factoryUsed != null)
+      {
+         return factoryUsed.getDirectory();
+      }
+      else
+      {
+         return null;
+      }
+   }
 
    public boolean isPaging()
    {

Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java	2011-12-13 18:40:00 UTC (rev 11906)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java	2011-12-13 19:32:09 UTC (rev 11907)
@@ -779,4 +779,13 @@
    {
    }
 
+   /* (non-Javadoc)
+    * @see org.hornetq.core.journal.SequentialFileFactory#getDirectory()
+    */
+   public String getDirectory()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
 }



More information about the hornetq-commits mailing list