activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1394732 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/broker/region/Topic.java test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java
Date Fri, 05 Oct 2012 19:04:18 GMT
Author: gtully
Date: Fri Oct  5 19:04:18 2012
New Revision: 1394732

URL: http://svn.apache.org/viewvc?rev=1394732&view=rev
Log:
polish: some typos

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java?rev=1394732&r1=1394731&r2=1394732&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
Fri Oct  5 19:04:18 2012
@@ -67,7 +67,7 @@ public class Topic extends BaseDestinati
     private final ReentrantReadWriteLock dispatchLock = new ReentrantReadWriteLock();
     private DispatchPolicy dispatchPolicy = new SimpleDispatchPolicy();
     private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy;
-    private final ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription> durableSubcribers
= new ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription>();
+    private final ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription> durableSubscribers
= new ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription>();
     private final TaskRunner taskRunner;
     private final LinkedList<Runnable> messagesWaitingForSpace = new LinkedList<Runnable>();
     private final Runnable sendMessagesWaitingForSpaceTask = new Runnable() {
@@ -171,7 +171,7 @@ public class Topic extends BaseDestinati
                     }
                 }
             }
-            durableSubcribers.put(dsub.getSubscriptionKey(), dsub);
+            durableSubscribers.put(dsub.getSubscriptionKey(), dsub);
         }
     }
 
@@ -188,7 +188,7 @@ public class Topic extends BaseDestinati
     public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws
Exception {
         if (topicStore != null) {
             topicStore.deleteSubscription(key.clientId, key.subscriptionName);
-            DurableTopicSubscription removed = durableSubcribers.remove(key);
+            DurableTopicSubscription removed = durableSubscribers.remove(key);
             if (removed != null) {
                 destinationStatistics.getConsumers().decrement();
                 // deactivate and remove
@@ -505,7 +505,7 @@ public class Topic extends BaseDestinati
     }
 
     private boolean canOptimizeOutPersistence() {
-        return durableSubcribers.size() == 0;
+        return durableSubscribers.size() == 0;
     }
 
     @Override
@@ -590,7 +590,7 @@ public class Topic extends BaseDestinati
                 });
                 final ConnectionContext connectionContext = createConnectionContext();
                 for (Message message : toExpire) {
-                    for (DurableTopicSubscription sub : durableSubcribers.values()) {
+                    for (DurableTopicSubscription sub : durableSubscribers.values()) {
                         if (!sub.isActive()) {
                             messageExpired(connectionContext, sub, message);
                         }
@@ -725,9 +725,9 @@ public class Topic extends BaseDestinati
     protected boolean isOptimizeStorage(){
         boolean result = false;
 
-        if (isDoOptimzeMessageStorage() && durableSubcribers.isEmpty()==false){
+        if (isDoOptimzeMessageStorage() && durableSubscribers.isEmpty()==false){
                 result = true;
-                for (DurableTopicSubscription s : durableSubcribers.values()) {
+                for (DurableTopicSubscription s : durableSubscribers.values()) {
                     if (s.isActive()== false){
                         result = false;
                         break;
@@ -755,7 +755,7 @@ public class Topic extends BaseDestinati
     public void clearPendingMessages() {
         dispatchLock.readLock().lock();
         try {
-            for (DurableTopicSubscription durableTopicSubscription : durableSubcribers.values())
{
+            for (DurableTopicSubscription durableTopicSubscription : durableSubscribers.values())
{
                 clearPendingAndDispatch(durableTopicSubscription);
             }
         } finally {
@@ -777,6 +777,6 @@ public class Topic extends BaseDestinati
     }
 
     public Map<SubscriptionKey, DurableTopicSubscription> getDurableTopicSubs() {
-        return durableSubcribers;
+        return durableSubscribers;
     }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java?rev=1394732&r1=1394731&r2=1394732&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java
Fri Oct  5 19:04:18 2012
@@ -78,12 +78,12 @@ public class DurableSubscriptionSelector
 
         Wait.waitFor(new Wait.Condition() { public boolean isSatisified() { return received
>= 1;} }, 10000);
 
-        assertEquals("Message is not recieved.", 1, received);
+        assertEquals("Message is not received.", 1, received);
 
         sendMessage(true);
         Thread.sleep(100);
 
-        assertEquals("Message is not recieved.", 2, received);
+        assertEquals("Message is not received.", 2, received);
     }
 
     private void openConsumer() throws Exception {



Mime
View raw message