activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r509912 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors: StoreDurableSubscriberCursor.java TopicStorePrefetch.java
Date Wed, 21 Feb 2007 06:17:18 GMT
Author: rajdavies
Date: Tue Feb 20 22:17:17 2007
New Revision: 509912

URL: http://svn.apache.org/viewvc?view=rev&rev=509912
Log:
synchronization changes

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java?view=diff&rev=509912&r1=509911&r2=509912
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
Tue Feb 20 22:17:17 2007
@@ -196,7 +196,7 @@
         pendingCount--;
     }
 
-    public void remove(MessageReference node){
+    public synchronized void remove(MessageReference node){
         if(currentCursor!=null){
             currentCursor.remove(node);
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java?view=diff&rev=509912&r1=509911&r2=509912
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
Tue Feb 20 22:17:17 2007
@@ -56,7 +56,7 @@
         this.subscriberName=subscriberName;
     }
 
-    public void start() throws Exception{
+    public synchronized void start() throws Exception{
         if(batchList.isEmpty()){
             try{
                 fillBatch();
@@ -68,7 +68,7 @@
         }
     }
 
-    public void stop() throws Exception{
+    public synchronized void stop() throws Exception{
         store.resetBatching(clientId,subscriberName);
         gc();
     }
@@ -145,7 +145,7 @@
     public void finished(){
     }
 
-    public void recoverMessage(Message message) throws Exception{
+    public synchronized void recoverMessage(Message message) throws Exception{
         message.setRegionDestination(regionDestination);
         // only increment if count is zero (could have been cached)
         if(message.getReferenceCount()==0){
@@ -160,11 +160,11 @@
     }
 
     // implementation
-    protected void fillBatch() throws Exception{
+    protected synchronized void fillBatch() throws Exception{
         store.recoverNextMessages(clientId,subscriberName,maxBatchSize,this);
     }
 
-    public void gc(){
+    public synchronized void gc(){
         for(Message msg:batchList){
             msg.decrementReferenceCount();
         }



Mime
View raw message