activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r377412 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker: Broker.java BrokerFilter.java EmptyBroker.java ErrorBroker.java MutableBrokerFilter.java region/RegionBroker.java
Date Mon, 13 Feb 2006 16:31:38 GMT
Author: rajdavies
Date: Mon Feb 13 08:31:37 2006
New Revision: 377412

URL: http://svn.apache.org/viewcvs?rev=377412&view=rev
Log:
Added getDurableDestinations() to Broker - to make accessable for NetworkConnectors

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java?rev=377412&r1=377411&r2=377412&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
Mon Feb 13 08:31:37 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Set;
 import org.apache.activemq.Service;
 import org.apache.activemq.broker.region.Region;
 import org.apache.activemq.command.ActiveMQDestination;
@@ -205,5 +206,10 @@
      * @return true if the broker has stopped
      */
     public boolean isStopped();
+    
+    /**
+     * @return a Set of all durable destinations
+     */
+    public Set getDurableDestinations();
     
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java?rev=377412&r1=377411&r2=377412&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
Mon Feb 13 08:31:37 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Set;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.BrokerId;
@@ -186,6 +187,10 @@
     
     public boolean isStopped(){
         return next.isStopped();
+    }
+    
+    public Set getDurableDestinations(){
+        return next.getDurableDestinations();
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java?rev=377412&r1=377411&r2=377412&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
Mon Feb 13 08:31:37 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Set;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.BrokerId;
@@ -184,6 +185,10 @@
     
     public boolean isStopped(){
         return false;
+    }
+    
+    public Set getDurableDestinations(){
+        return null;
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java?rev=377412&r1=377411&r2=377412&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
Mon Feb 13 08:31:37 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Set;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.BrokerId;
@@ -182,6 +183,10 @@
     
     public boolean isStopped(){
         return true;
+    }
+    
+    public Set getDurableDestinations(){
+        throw new IllegalStateException(this.message);
     }
     
    

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java?rev=377412&r1=377411&r2=377412&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
Mon Feb 13 08:31:37 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Set;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.BrokerId;
@@ -196,6 +197,10 @@
     
     public boolean isStopped(){
         return getNext().isStopped();
+    }
+    
+    public Set getDurableDestinations(){
+        return getNext().getDurableDestinations();
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?rev=377412&r1=377411&r2=377412&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Mon Feb 13 08:31:37 2006
@@ -52,6 +52,7 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Routes Broker operations to the correct messaging regions for processing.
@@ -79,6 +80,7 @@
     private BrokerId brokerId;
     private String brokerName;
     private Map clientIdSet = new HashMap(); // we will synchronize access
+    private PersistenceAdapter adaptor;
 
     public RegionBroker(BrokerService brokerService,TaskRunnerFactory taskRunnerFactory,
UsageManager memoryManager, PersistenceAdapter adapter) throws IOException {
         this(brokerService,taskRunnerFactory, memoryManager, createDefaultPersistenceAdapter(memoryManager),
null);
@@ -87,7 +89,7 @@
     public RegionBroker(BrokerService brokerService,TaskRunnerFactory taskRunnerFactory,
UsageManager memoryManager, PersistenceAdapter adapter, PolicyMap policyMap) throws IOException
{
         this.brokerService = brokerService;
         this.sequenceGenerator.setLastSequenceId( adapter.getLastMessageBrokerSequenceId()
);
-        
+        this.adaptor = adaptor;
         queueRegion = createQueueRegion(memoryManager, taskRunnerFactory, adapter, policyMap);
         topicRegion = createTopicRegion(memoryManager, taskRunnerFactory, adapter, policyMap);
         
@@ -451,6 +453,10 @@
     
     public boolean isStopped(){
         return stopped;
+    }
+    
+    public Set getDurableDestinations(){
+        return adaptor.getDestinations();
     }
 
     



Mime
View raw message