[hornetq-commits] JBoss hornetq SVN: r11303 - in branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core: protocol/core/impl and 3 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Sep 7 12:10:18 EDT 2011


Author: borges
Date: 2011-09-07 12:10:18 -0400 (Wed, 07 Sep 2011)
New Revision: 11303

Removed:
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationCurrentPagesMessage.java
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/protocol/core/impl/PacketDecoder.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/PacketImpl.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/ReplicationManager.java
   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/ReplicationManagerImpl.java
Log:
HORNETQ-720 Remove unnecessary replication package.

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-07 16:09:20 UTC (rev 11302)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java	2011-09-07 16:10:18 UTC (rev 11303)
@@ -467,7 +467,6 @@
          // HORNETQ-720 XXX perhaps before? unnecessary?
          store.forceAnotherPage();
       }
-      replicator.sendPagingInfo(info);
       return info;
    }
 

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/PacketDecoder.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/PacketDecoder.java	2011-09-07 16:09:20 UTC (rev 11302)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/PacketDecoder.java	2011-09-07 16:10:18 UTC (rev 11303)
@@ -102,7 +102,6 @@
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationAddTXMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCommitMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCompareDataMessage;
-import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCurrentPagesMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationDeleteMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationDeleteTXMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationLargeMessageBeingMessage;
@@ -537,11 +536,6 @@
             packet = new ReplicationSyncFileMessage();
             break;
          }
-         case PacketImpl.REPLICATION_CURRENT_PAGES_INFO:
-         {
-            packet = new ReplicationCurrentPagesMessage();
-            break;
-         }
          default:
          {
             throw new IllegalArgumentException("Invalid type: " + packetType);

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/PacketImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/PacketImpl.java	2011-09-07 16:09:20 UTC (rev 11302)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/PacketImpl.java	2011-09-07 16:10:18 UTC (rev 11303)
@@ -196,7 +196,6 @@
    public static final byte HA_BACKUP_REGISTRATION = 113;
 
    public static final byte REPLICATION_START_STOP_SYNC = 120;
-   public static final byte REPLICATION_CURRENT_PAGES_INFO = 121;
 
    // Static --------------------------------------------------------
 

Deleted: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationCurrentPagesMessage.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationCurrentPagesMessage.java	2011-09-07 16:09:20 UTC (rev 11302)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationCurrentPagesMessage.java	2011-09-07 16:10:18 UTC (rev 11303)
@@ -1,77 +0,0 @@
-/**
- *
- */
-package org.hornetq.core.protocol.core.impl.wireformat;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.hornetq.api.core.HornetQBuffer;
-import org.hornetq.api.core.SimpleString;
-import org.hornetq.core.protocol.core.impl.PacketImpl;
-
-public final class ReplicationCurrentPagesMessage extends PacketImpl
-{
-
-   private Map<SimpleString, Collection<Integer>> info;
-
-   /**
-    * @param type
-    */
-   public ReplicationCurrentPagesMessage()
-   {
-      super(REPLICATION_CURRENT_PAGES_INFO);
-   }
-
-   /**
-    * @param info
-    */
-   public ReplicationCurrentPagesMessage(Map<SimpleString, Collection<Integer>> info)
-   {
-      this();
-      this.info = info;
-   }
-
-   @Override
-   public void decodeRest(HornetQBuffer buffer)
-   {
-      info = new HashMap<SimpleString, Collection<Integer>>();
-      int entries = buffer.readInt();
-      for (int i = 0; i < entries; i++)
-      {
-         SimpleString name = buffer.readSimpleString();
-         int nPages = buffer.readInt();
-         List<Integer> ids = new ArrayList<Integer>(nPages);
-         for (int j = 0; j < nPages; j++)
-         {
-            ids.add(Integer.valueOf(buffer.readInt()));
-         }
-         info.put(name, ids);
-      }
-   }
-
-   @Override
-   public void encodeRest(HornetQBuffer buffer)
-   {
-      buffer.writeInt(info.size());
-      for (Entry<SimpleString, Collection<Integer>> entry : info.entrySet())
-      {
-         buffer.writeSimpleString(entry.getKey());
-         Collection<Integer> value = entry.getValue();
-         buffer.writeInt(value.size());
-         for (Integer id : value)
-         {
-            buffer.writeInt(id);
-         }
-      }
-   }
-
-   public Map<SimpleString, Collection<Integer>> getInfo()
-   {
-      return info;
-   }
-}

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/ReplicationManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/ReplicationManager.java	2011-09-07 16:09:20 UTC (rev 11302)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/ReplicationManager.java	2011-09-07 16:10:18 UTC (rev 11303)
@@ -13,8 +13,6 @@
 
 package org.hornetq.core.replication;
 
-import java.util.Collection;
-import java.util.Map;
 import java.util.Set;
 
 import org.hornetq.api.core.HornetQException;
@@ -117,8 +115,6 @@
     */
    void syncLargeMessageFile(SequentialFile seqFile, long size, long id) throws Exception;
 
-   void sendPagingInfo(Map<SimpleString, Collection<Integer>> info);
-
    /**
     * @param file
     * @param id

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-07 16:09:20 UTC (rev 11302)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java	2011-09-07 16:10:18 UTC (rev 11303)
@@ -14,7 +14,6 @@
 package org.hornetq.core.replication.impl;
 
 import java.nio.ByteBuffer;
-import java.util.Collection;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
@@ -48,7 +47,6 @@
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationAddTXMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCommitMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCompareDataMessage;
-import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCurrentPagesMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationDeleteMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationDeleteTXMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationLargeMessageBeingMessage;
@@ -207,10 +205,6 @@
          {
             handleReplicationSynchronization((ReplicationSyncFileMessage)packet);
          }
-         else if (type == PacketImpl.REPLICATION_CURRENT_PAGES_INFO)
-         {
-            handleCurrentPagesInfo((ReplicationCurrentPagesMessage)packet);
-         }
          else
          {
             log.warn("Packet " + packet + " can't be processed by the ReplicationEndpoint");
@@ -230,17 +224,6 @@
       channel.send(response);
    }
 
-   /**
-    * @param packet
-    */
-   private void handleCurrentPagesInfo(ReplicationCurrentPagesMessage packet)
-   {
-      for (Entry<SimpleString, Collection<Integer>> entry : packet.getInfo().entrySet())
-      {
-         // ignore the actual file list for the moment...
-      }
-   }
-
    public boolean isStarted()
    {
       return started;

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java	2011-09-07 16:09:20 UTC (rev 11302)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java	2011-09-07 16:10:18 UTC (rev 11303)
@@ -14,9 +14,7 @@
 package org.hornetq.core.replication.impl;
 
 import java.nio.ByteBuffer;
-import java.util.Collection;
 import java.util.LinkedHashSet;
-import java.util.Map;
 import java.util.Queue;
 import java.util.Set;
 import java.util.concurrent.ConcurrentLinkedQueue;
@@ -44,7 +42,6 @@
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationAddTXMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCommitMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCompareDataMessage;
-import org.hornetq.core.protocol.core.impl.wireformat.ReplicationCurrentPagesMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationDeleteMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationDeleteTXMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.ReplicationLargeMessageBeingMessage;
@@ -583,10 +580,4 @@
       ReplicationStartSyncMessage msg = new ReplicationStartSyncMessage(null, null);
       sendReplicatePacket(msg);
    }
-
-   @Override
-   public void sendPagingInfo(Map<SimpleString, Collection<Integer>> info)
-   {
-      sendReplicatePacket(new ReplicationCurrentPagesMessage(info));
-   }
 }



More information about the hornetq-commits mailing list