[hornetq-commits] JBoss hornetq SVN: r11328 - in branches/HORNETQ-720_Replication: hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Sep 12 10:09:35 EDT 2011


Author: borges
Date: 2011-09-12 10:09:34 -0400 (Mon, 12 Sep 2011)
New Revision: 11328

Modified:
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
   branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
   branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java
Log:
Reduce visibility and other clean-ups

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java	2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java	2011-09-12 14:09:34 UTC (rev 11328)
@@ -159,14 +159,11 @@
 
    void updatePageTransaction(long txID, PageTransactionInfo pageTransaction,  int depage) throws Exception;
 
+   /** FIXME Unused */
    void updatePageTransaction(PageTransactionInfo pageTransaction,  int depage) throws Exception;
 
    void deletePageTransactional(long recordID) throws Exception;
 
-   /** This method is only useful at the backup side. We only load internal structures making the journals ready for
-    *  append mode on the backup side. */
-   JournalLoadInformation[] loadInternalOnly() throws Exception;
-
    JournalLoadInformation loadMessageJournal(final PostOffice postOffice,
                                              final PagingManager pagingManager,
                                              final ResourceManager resourceManager,
@@ -186,7 +183,7 @@
 
    JournalLoadInformation loadBindingJournal(List<QueueBindingInfo> queueBindingInfos, List<GroupingInfo> groupingInfos) throws Exception;
 
-   // grouping relateed operations
+   // grouping related operations
    void addGrouping(GroupBinding groupBinding) throws Exception;
 
    void deleteGrouping(GroupBinding groupBinding) throws Exception;

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java	2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java	2011-09-12 14:09:34 UTC (rev 11328)
@@ -117,43 +117,43 @@
    private static final long CHECKPOINT_BATCH_SIZE = Integer.MAX_VALUE;
 
    // grouping journal record type
-   public static final byte GROUP_RECORD = 20;
+   private static final byte GROUP_RECORD = 20;
 
    // Bindings journal record type
 
-   public static final byte QUEUE_BINDING_RECORD = 21;
+   private static final byte QUEUE_BINDING_RECORD = 21;
 
    public static final byte ID_COUNTER_RECORD = 24;
 
-   public static final byte ADDRESS_SETTING_RECORD = 25;
+   private static final byte ADDRESS_SETTING_RECORD = 25;
 
-   public static final byte SECURITY_RECORD = 26;
+   private static final byte SECURITY_RECORD = 26;
 
    // Message journal record types
 
-   public static final byte ADD_LARGE_MESSAGE = 30;
+   private static final byte ADD_LARGE_MESSAGE = 30;
 
-   public static final byte ADD_MESSAGE = 31;
+   private static final byte ADD_MESSAGE = 31;
 
-   public static final byte ADD_REF = 32;
+   private static final byte ADD_REF = 32;
 
-   public static final byte ACKNOWLEDGE_REF = 33;
+   private static final byte ACKNOWLEDGE_REF = 33;
 
    public static final byte UPDATE_DELIVERY_COUNT = 34;
 
    public static final byte PAGE_TRANSACTION = 35;
 
-   public static final byte SET_SCHEDULED_DELIVERY_TIME = 36;
+   private static final byte SET_SCHEDULED_DELIVERY_TIME = 36;
 
-   public static final byte DUPLICATE_ID = 37;
+   private static final byte DUPLICATE_ID = 37;
 
-   public static final byte HEURISTIC_COMPLETION = 38;
+   private static final byte HEURISTIC_COMPLETION = 38;
 
    public static final byte ACKNOWLEDGE_CURSOR = 39;
 
-   public static final byte PAGE_CURSOR_COUNTER_VALUE = 40;
+   private static final byte PAGE_CURSOR_COUNTER_VALUE = 40;
 
-   public static final byte PAGE_CURSOR_COUNTER_INC = 41;
+   private static final byte PAGE_CURSOR_COUNTER_INC = 41;
 
    private final BatchingIDGenerator idGenerator;
    private final ReentrantReadWriteLock storageManagerLock = new ReentrantReadWriteLock(true);
@@ -604,11 +604,6 @@
       OperationContextImpl.setContext(context);
    }
 
-   public Executor getSingleThreadExecutor()
-   {
-      return singleThreadExecutor;
-   }
-
    public OperationContext newSingleThreadContext()
    {
       return newContext(singleThreadExecutor);
@@ -644,7 +639,7 @@
       return new LargeServerMessageImpl(this);
    }
 
-   protected void addBytesToLargeMessage(final SequentialFile file, final long messageId, final byte[] bytes)
+   protected final void addBytesToLargeMessage(final SequentialFile file, final long messageId, final byte[] bytes)
             throws Exception
    {
       readLock();
@@ -1922,7 +1917,7 @@
       }
    }
 
-   public static void describeBindingJournal(final String bindingsDir) throws Exception
+   static void describeBindingJournal(final String bindingsDir) throws Exception
    {
 
       SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(bindingsDir);
@@ -1932,7 +1927,7 @@
       describeJournal(bindingsFF, bindings);
    }
 
-   public static void describeMessagesJournal(final String messagesDir) throws Exception
+   static void describeMessagesJournal(final String messagesDir) throws Exception
    {
 
       SequentialFileFactory messagesFF = new NIOSequentialFileFactory(messagesDir);
@@ -2079,9 +2074,6 @@
       return started;
    }
 
-   /* (non-Javadoc)
-    * @see org.hornetq.core.persistence.StorageManager#loadInternalOnly()
-    */
    public JournalLoadInformation[] loadInternalOnly() throws Exception
    {
       readLock();
@@ -2517,7 +2509,7 @@
    // Inner Classes
    // ----------------------------------------------------------------------------
 
-   static class DummyOperationContext implements OperationContext
+   private final static class DummyOperationContext implements OperationContext
    {
 
       private static DummyOperationContext instance = new DummyOperationContext();
@@ -2528,13 +2520,6 @@
       }
 
       /* (non-Javadoc)
-       * @see org.hornetq.core.persistence.OperationContext#complete()
-       */
-      public void complete()
-      {
-      }
-
-      /* (non-Javadoc)
        * @see org.hornetq.core.persistence.OperationContext#executeOnCompletion(org.hornetq.core.journal.IOAsyncTask)
        */
       public void executeOnCompletion(final IOAsyncTask runnable)
@@ -3670,7 +3655,7 @@
     * @param buffer
     * @return
     */
-   protected static GroupingEncoding newGroupEncoding(long id, HornetQBuffer buffer)
+   private static GroupingEncoding newGroupEncoding(long id, HornetQBuffer buffer)
    {
       GroupingEncoding encoding = new GroupingEncoding();
       encoding.decode(buffer);
@@ -3683,7 +3668,7 @@
     * @param buffer
     * @return
     */
-   protected static PersistentQueueBindingEncoding newBindingEncoding(long id, HornetQBuffer buffer)
+   private static PersistentQueueBindingEncoding newBindingEncoding(long id, HornetQBuffer buffer)
    {
       PersistentQueueBindingEncoding bindingEncoding = new PersistentQueueBindingEncoding();
 

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java	2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java	2011-09-12 14:09:34 UTC (rev 11328)
@@ -174,12 +174,10 @@
          }
          else if (type == PacketImpl.REPLICATION_PAGE_WRITE)
          {
-            System.out.println("PAGE_WRITE");
             handlePageWrite((ReplicationPageWriteMessage)packet);
          }
          else if (type == PacketImpl.REPLICATION_PAGE_EVENT)
          {
-            System.out.println("PAGE_EVENT");
             handlePageEvent((ReplicationPageEventMessage)packet);
          }
          else if (type == PacketImpl.REPLICATION_LARGE_MESSAGE_BEGIN)

Modified: branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java	2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java	2011-09-12 14:09:34 UTC (rev 11328)
@@ -36,7 +36,7 @@
  *
  *
  */
-public abstract class AbstractSequentialFile implements SequentialFile
+abstract class AbstractSequentialFile implements SequentialFile
 {
 
    // Constants -----------------------------------------------------

Modified: branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java	2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java	2011-09-12 14:09:34 UTC (rev 11328)
@@ -38,7 +38,7 @@
  * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
  *
  */
-public abstract class AbstractSequentialFileFactory implements SequentialFileFactory
+abstract class AbstractSequentialFileFactory implements SequentialFileFactory
 {
 
    // Timeout used to wait executors to shutdown
@@ -61,7 +61,7 @@
     *  */
    protected ExecutorService writeExecutor;
 
-   public AbstractSequentialFileFactory(final String journalDir,
+   AbstractSequentialFileFactory(final String journalDir,
                                         final boolean buffered,
                                         final int bufferSize,
                                         final int bufferTimeout,



More information about the hornetq-commits mailing list