activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r490813 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/QuickJournalMessageStore.java
Date Thu, 28 Dec 2006 21:02:44 GMT
Author: rajdavies
Date: Thu Dec 28 13:02:44 2006
New Revision: 490813

URL: http://svn.apache.org/viewvc?view=rev&rev=490813
Log:
updated recoverNextMessages()

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/QuickJournalMessageStore.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/QuickJournalMessageStore.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/QuickJournalMessageStore.java?view=diff&rev=490813&r1=490812&r2=490813
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/QuickJournalMessageStore.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/QuickJournalMessageStore.java
Thu Dec 28 13:02:44 2006
@@ -426,9 +426,32 @@
     }
 
     
-    public void recoverNextMessages(int maxReturned,MessageRecoveryListener listener) throws
Exception{
+    public void recoverNextMessages(int maxReturned,final MessageRecoveryListener listener)
throws Exception{
         peristenceAdapter.checkpoint(true, true);
-        longTermStore.recoverNextMessages(maxReturned,listener);
+        longTermStore.recoverNextMessages(maxReturned,new MessageRecoveryListener() {
+
+            public void finished(){
+                listener.finished();
+                
+            }
+
+            public boolean hasSpace(){
+                return listener.hasSpace();
+            }
+
+            public void recoverMessage(Message message) throws Exception{
+               throw new IOException("Should not get called");
+                
+            }
+
+            public void recoverMessageReference(String messageReference) throws Exception{
+                RecordLocation loc = toRecordLocation(messageReference);
+                Message message = (Message) peristenceAdapter.readCommand(loc);
+                listener.recoverMessage(message);
+                
+            }
+            
+        });
         
     }
 



Mime
View raw message