[hornetq-commits] JBoss hornetq SVN: r9841 - in branches/Branch_New_Paging/src/main/org/hornetq/core: paging/cursor/impl and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 3 21:25:12 EDT 2010


Author: clebert.suconic at jboss.com
Date: 2010-11-03 21:25:11 -0400 (Wed, 03 Nov 2010)
New Revision: 9841

Modified:
   branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PageSubscription.java
   branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PagedReferenceImpl.java
   branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
   branches/Branch_New_Paging/src/main/org/hornetq/core/server/MessageReference.java
   branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/LastValueQueue.java
   branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/MessageReferenceImpl.java
   branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
backup

Modified: branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PageSubscription.java
===================================================================
--- branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PageSubscription.java	2010-11-03 21:17:32 UTC (rev 9840)
+++ branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PageSubscription.java	2010-11-04 01:25:11 UTC (rev 9841)
@@ -13,8 +13,7 @@
 
 package org.hornetq.core.paging.cursor;
 
-import org.hornetq.api.core.Pair;
-import org.hornetq.core.paging.PagedMessage;
+import org.hornetq.core.server.Queue;
 import org.hornetq.core.transaction.Transaction;
 import org.hornetq.utils.LinkedListIterator;
 
@@ -89,7 +88,7 @@
 
    void processReload() throws Exception;
 
-   /**
+   /**      
     * To be used on redeliveries
     * @param position
     */
@@ -101,7 +100,12 @@
     * @param minPage
     * @return
     */
-   boolean isComplete(long minPage);
+   boolean isComplete(long page);
 
+   /** wait all the scheduled runnables to finish their current execution */
    void flushExecutors();
+   
+   void setQueue(Queue queue);
+   
+   Queue getQueue();
 }

Modified: branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PagedReferenceImpl.java
===================================================================
--- branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PagedReferenceImpl.java	2010-11-03 21:17:32 UTC (rev 9840)
+++ branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/PagedReferenceImpl.java	2010-11-04 01:25:11 UTC (rev 9841)
@@ -54,6 +54,11 @@
       this.a = a;
       this.b = b;
    }
+   
+   public boolean isPaged()
+   {
+      return true;
+   }
 
    /* (non-Javadoc)
     * @see org.hornetq.core.server.MessageReference#copy(org.hornetq.core.server.Queue)

Modified: branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
===================================================================
--- branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java	2010-11-03 21:17:32 UTC (rev 9840)
+++ branches/Branch_New_Paging/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java	2010-11-04 01:25:11 UTC (rev 9841)
@@ -38,6 +38,7 @@
 import org.hornetq.core.paging.cursor.PagedReference;
 import org.hornetq.core.paging.cursor.PagedReferenceImpl;
 import org.hornetq.core.persistence.StorageManager;
+import org.hornetq.core.server.Queue;
 import org.hornetq.core.server.ServerMessage;
 import org.hornetq.core.transaction.Transaction;
 import org.hornetq.core.transaction.TransactionOperationAbstract;
@@ -77,6 +78,8 @@
 
    private final long cursorId;
    
+   private Queue queue;
+   
    private final boolean persistent;
 
    private final Filter filter;
@@ -121,6 +124,16 @@
 
    // Public --------------------------------------------------------
 
+   public Queue getQueue()
+   {
+      return queue;
+   }
+   
+   public void setQueue(Queue queue)
+   {
+      this.queue = queue;
+   }
+   
    public void disableAutoCleanup()
    {
       autoCleanup = false;
@@ -267,8 +280,6 @@
    {
       return new CursorIterator();
    }
-   
-   int validCount = 0;
 
    /* (non-Javadoc)
     * @see org.hornetq.core.paging.cursor.PageCursor#moveNext()

Modified: branches/Branch_New_Paging/src/main/org/hornetq/core/server/MessageReference.java
===================================================================
--- branches/Branch_New_Paging/src/main/org/hornetq/core/server/MessageReference.java	2010-11-03 21:17:32 UTC (rev 9840)
+++ branches/Branch_New_Paging/src/main/org/hornetq/core/server/MessageReference.java	2010-11-04 01:25:11 UTC (rev 9841)
@@ -26,6 +26,9 @@
  */
 public interface MessageReference
 {
+   
+   boolean isPaged();
+   
    ServerMessage getMessage();
 
    MessageReference copy(Queue queue);

Modified: branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/LastValueQueue.java
===================================================================
--- branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/LastValueQueue.java	2010-11-03 21:17:32 UTC (rev 9840)
+++ branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/LastValueQueue.java	2010-11-04 01:25:11 UTC (rev 9841)
@@ -228,5 +228,10 @@
       {
          ref.setScheduledDeliveryTime(scheduledDeliveryTime);
       }
+      
+      public boolean isPaged()
+      {
+         return false;
+      }
    }
 }

Modified: branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/MessageReferenceImpl.java
===================================================================
--- branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/MessageReferenceImpl.java	2010-11-03 21:17:32 UTC (rev 9840)
+++ branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/MessageReferenceImpl.java	2010-11-04 01:25:11 UTC (rev 9841)
@@ -144,6 +144,11 @@
    {
       queue.referenceHandled();
    }
+   
+   public boolean isPaged()
+   {
+      return false;
+   }
 
    // Public --------------------------------------------------------
 

Modified: branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/QueueImpl.java	2010-11-03 21:17:32 UTC (rev 9840)
+++ branches/Branch_New_Paging/src/main/org/hornetq/core/server/impl/QueueImpl.java	2010-11-04 01:25:11 UTC (rev 9841)
@@ -217,6 +217,11 @@
       {
          expiryAddress = null;
       }
+      
+      if (pageSubscription != null)
+      {
+         pageSubscription.setQueue(this);
+      }
 
       this.executor = executor;
 



More information about the hornetq-commits mailing list