qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1588589 - in /qpid/trunk/qpid/java: broker-core/src/main/java/org/apache/qpid/server/binding/ broker-core/src/main/java/org/apache/qpid/server/exchange/ broker-core/src/main/java/org/apache/qpid/server/queue/ broker-core/src/main/java/org/...
Date Fri, 18 Apr 2014 22:52:58 GMT
Author: rgodfrey
Date: Fri Apr 18 22:52:57 2014
New Revision: 1588589

URL: http://svn.apache.org/r1588589
Log:
QPID-5578 : [Java Broker] Remove DurableConfigurationStoreHelper as it no longer does anything
useful

Removed:
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java
Modified:
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingImpl.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/VirtualHostMessageStoreTest.java

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingImpl.java?rev=1588589&r1=1588588&r2=1588589&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingImpl.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingImpl.java
Fri Apr 18 22:52:57 2014
@@ -39,7 +39,6 @@ import org.apache.qpid.server.model.Queu
 import org.apache.qpid.server.model.State;
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.queue.AMQQueue;
-import org.apache.qpid.server.store.DurableConfigurationStoreHelper;
 import org.apache.qpid.server.util.StateChangeListener;
 import org.apache.qpid.server.virtualhost.VirtualHostImpl;
 
@@ -84,7 +83,7 @@ public class BindingImpl
         super.onCreate();
         if (isDurable())
         {
-            DurableConfigurationStoreHelper.createBinding(_queue.getVirtualHost().getDurableConfigurationStore(),
this);
+            _queue.getVirtualHost().getDurableConfigurationStore().create(asObjectRecord());
         }
 
     }

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?rev=1588589&r1=1588588&r2=1588589&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
Fri Apr 18 22:52:57 2014
@@ -59,7 +59,6 @@ import org.apache.qpid.server.model.Stat
 import org.apache.qpid.server.plugin.ExchangeType;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.BaseQueue;
-import org.apache.qpid.server.store.DurableConfigurationStoreHelper;
 import org.apache.qpid.server.store.StorableMessageMetaData;
 import org.apache.qpid.server.txn.ServerTransaction;
 import org.apache.qpid.server.util.Action;
@@ -179,7 +178,7 @@ public abstract class AbstractExchange<T
         super.onCreate();
         if(isDurable())
         {
-            DurableConfigurationStoreHelper.createExchange(getVirtualHost().getDurableConfigurationStore(),
this);
+            getVirtualHost().getDurableConfigurationStore().create(asObjectRecord());
         }
 
     }
@@ -219,7 +218,7 @@ public abstract class AbstractExchange<T
 
         if (isDurable() && !isAutoDelete())
         {
-            DurableConfigurationStoreHelper.removeExchange(getVirtualHost().getDurableConfigurationStore(),
this);
+            getVirtualHost().getDurableConfigurationStore().remove(asObjectRecord());
 
         }
 
@@ -247,7 +246,7 @@ public abstract class AbstractExchange<T
 
             if (isDurable() && !isAutoDelete())
             {
-                DurableConfigurationStoreHelper.removeExchange(getVirtualHost().getDurableConfigurationStore(),
this);
+                getVirtualHost().getDurableConfigurationStore().remove(asObjectRecord());
 
             }
         }
@@ -652,7 +651,7 @@ public abstract class AbstractExchange<T
 
             if (b.isDurable())
             {
-                DurableConfigurationStoreHelper.removeBinding(_virtualHost.getDurableConfigurationStore(),
b);
+                _virtualHost.getDurableConfigurationStore().remove(b.asObjectRecord());
             }
             b.delete();
         }

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java?rev=1588589&r1=1588588&r2=1588589&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
Fri Apr 18 22:52:57 2014
@@ -75,7 +75,6 @@ import org.apache.qpid.server.protocol.A
 import org.apache.qpid.server.protocol.AMQSessionModel;
 import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.security.auth.AuthenticatedPrincipal;
-import org.apache.qpid.server.store.DurableConfigurationStoreHelper;
 import org.apache.qpid.server.store.StorableMessageMetaData;
 import org.apache.qpid.server.txn.AutoCommitTransaction;
 import org.apache.qpid.server.txn.LocalTransaction;
@@ -247,7 +246,7 @@ public abstract class AbstractQueue<X ex
         if (isDurable() && !(getLifetimePolicy()  == LifetimePolicy.DELETE_ON_CONNECTION_CLOSE
                              || getLifetimePolicy() == LifetimePolicy.DELETE_ON_SESSION_END))
         {
-            DurableConfigurationStoreHelper.createQueue(_virtualHost.getDurableConfigurationStore(),
this);
+            _virtualHost.getDurableConfigurationStore().create(asObjectRecord());
         }
     }
 
@@ -2728,8 +2727,7 @@ public abstract class AbstractQueue<X ex
         {
             if (isDurable())
             {
-                DurableConfigurationStoreHelper.updateQueue(this.getVirtualHost().getDurableConfigurationStore(),
-                                                            this);
+                this.getVirtualHost().getDurableConfigurationStore().update(false, asObjectRecord());
             }
         }
     }

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java?rev=1588589&r1=1588588&r2=1588589&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
Fri Apr 18 22:52:57 2014
@@ -75,7 +75,6 @@ import org.apache.qpid.server.security.a
 import org.apache.qpid.server.stats.StatisticsCounter;
 import org.apache.qpid.server.store.ConfiguredObjectRecord;
 import org.apache.qpid.server.store.DurableConfigurationStore;
-import org.apache.qpid.server.store.DurableConfigurationStoreHelper;
 import org.apache.qpid.server.store.DurableConfiguredObjectRecoverer;
 import org.apache.qpid.server.store.Event;
 import org.apache.qpid.server.store.EventListener;
@@ -594,7 +593,7 @@ public abstract class AbstractVirtualHos
                                       == LifetimePolicy.DELETE_ON_SESSION_END))
         {
             DurableConfigurationStore store = getDurableConfigurationStore();
-            DurableConfigurationStoreHelper.removeQueue(store, queue);
+            store.remove(queue.asObjectRecord());
         }
         return purged;
 }

Modified: qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java?rev=1588589&r1=1588588&r2=1588589&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
Fri Apr 18 22:52:57 2014
@@ -124,7 +124,7 @@ public abstract class AbstractDurableCon
     public void testCreateExchange() throws Exception
     {
         ExchangeImpl exchange = createTestExchange();
-        DurableConfigurationStoreHelper.createExchange(_configStore, exchange);
+        _configStore.create(exchange.asObjectRecord());
 
         reopenStore();
         verify(_handler).handle(matchesRecord(_exchangeId, EXCHANGE,
@@ -156,9 +156,9 @@ public abstract class AbstractDurableCon
     public void testRemoveExchange() throws Exception
     {
         ExchangeImpl exchange = createTestExchange();
-        DurableConfigurationStoreHelper.createExchange(_configStore, exchange);
+        _configStore.create(exchange.asObjectRecord());
 
-        DurableConfigurationStoreHelper.removeExchange(_configStore, exchange);
+        _configStore.remove(exchange.asObjectRecord());
 
         reopenStore();
         verify(_handler, never()).handle(any(ConfiguredObjectRecord.class));
@@ -169,10 +169,10 @@ public abstract class AbstractDurableCon
         ExchangeImpl<?> exchange = createTestExchange();
         AMQQueue queue = createTestQueue(QUEUE_NAME, "queueOwner", false, null);
         BindingImpl binding = createBinding(UUIDGenerator.generateRandomUUID(), ROUTING_KEY,
queue,
-                                                            exchange, _bindingArgs);
-        DurableConfigurationStoreHelper.createExchange(_configStore, exchange);
-        DurableConfigurationStoreHelper.createQueue(_configStore, queue);
-        DurableConfigurationStoreHelper.createBinding(_configStore, binding);
+                                            exchange, _bindingArgs);
+        _configStore.create(exchange.asObjectRecord());
+        _configStore.create(queue.asObjectRecord());
+        _configStore.create(binding.asObjectRecord());
 
         reopenStore();
 
@@ -257,14 +257,14 @@ public abstract class AbstractDurableCon
     public void testUnbindQueue() throws Exception
     {
         ExchangeImpl<?> exchange = createTestExchange();
-        DurableConfigurationStoreHelper.createExchange(_configStore, exchange);
+        _configStore.create(exchange.asObjectRecord());
 
         AMQQueue queue = createTestQueue(QUEUE_NAME, "queueOwner", false, null);
         BindingImpl binding = createBinding(UUIDGenerator.generateRandomUUID(), ROUTING_KEY,
queue,
-                                                            exchange, _bindingArgs);
-        DurableConfigurationStoreHelper.createBinding(_configStore, binding);
+                                            exchange, _bindingArgs);
+        _configStore.create(binding.asObjectRecord());
 
-        DurableConfigurationStoreHelper.removeBinding(_configStore, binding);
+        _configStore.remove(binding.asObjectRecord());
         reopenStore();
 
         verify(_handler, never()).handle(matchesRecord(ANY_UUID, BINDING,
@@ -274,7 +274,7 @@ public abstract class AbstractDurableCon
     public void testCreateQueueAMQQueue() throws Exception
     {
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, null);
-        DurableConfigurationStoreHelper.createQueue(_configStore, queue);
+        _configStore.create(queue.asObjectRecord());
 
         reopenStore();
         Map<String, Object> queueAttributes = new HashMap<String, Object>();
@@ -291,7 +291,7 @@ public abstract class AbstractDurableCon
         attributes.put(Queue.MAXIMUM_DELIVERY_ATTEMPTS, 10);
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, attributes);
 
-        DurableConfigurationStoreHelper.createQueue(_configStore, queue);
+        _configStore.create(queue.asObjectRecord());
 
         reopenStore();
 
@@ -311,7 +311,7 @@ public abstract class AbstractDurableCon
         ExchangeImpl alternateExchange = createTestAlternateExchange();
 
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, alternateExchange,
null);
-        DurableConfigurationStoreHelper.createQueue(_configStore, queue);
+        _configStore.create(queue.asObjectRecord());
 
         reopenStore();
 
@@ -340,12 +340,12 @@ public abstract class AbstractDurableCon
         attributes.put(Queue.MAXIMUM_DELIVERY_ATTEMPTS, 10);
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, attributes);
 
-        DurableConfigurationStoreHelper.createQueue(_configStore, queue);
+        _configStore.create(queue.asObjectRecord());
 
         // update the queue to have exclusive=false
         queue = createTestQueue(getName(), getName() + "Owner", false, attributes);
 
-        DurableConfigurationStoreHelper.updateQueue(_configStore, queue);
+        _configStore.update(false, queue.asObjectRecord());
 
         reopenStore();
 
@@ -365,13 +365,13 @@ public abstract class AbstractDurableCon
         attributes.put(AbstractVirtualHost.CREATE_DLQ_ON_CREATION, Boolean.TRUE);
         attributes.put(Queue.MAXIMUM_DELIVERY_ATTEMPTS, 10);
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, attributes);
-        DurableConfigurationStoreHelper.createQueue(_configStore, queue);
+        _configStore.create(queue.asObjectRecord());
 
         // update the queue to have exclusive=false
         ExchangeImpl alternateExchange = createTestAlternateExchange();
         queue = createTestQueue(getName(), getName() + "Owner", false, alternateExchange,
attributes);
 
-        DurableConfigurationStoreHelper.updateQueue(_configStore, queue);
+        _configStore.update(false, queue.asObjectRecord());
 
         reopenStore();
 
@@ -391,10 +391,10 @@ public abstract class AbstractDurableCon
         attributes.put(AbstractVirtualHost.CREATE_DLQ_ON_CREATION, Boolean.TRUE);
         attributes.put(Queue.MAXIMUM_DELIVERY_ATTEMPTS, 10);
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, attributes);
-        DurableConfigurationStoreHelper.createQueue(_configStore, queue);
+        _configStore.create(queue.asObjectRecord());
 
         // remove queue
-        DurableConfigurationStoreHelper.removeQueue(_configStore,queue);
+        _configStore.remove(queue.asObjectRecord());
         reopenStore();
         verify(_handler, never()).handle(any(ConfiguredObjectRecord.class));
     }

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/VirtualHostMessageStoreTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/VirtualHostMessageStoreTest.java?rev=1588589&r1=1588588&r2=1588589&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/VirtualHostMessageStoreTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/VirtualHostMessageStoreTest.java
Fri Apr 18 22:52:57 2014
@@ -327,7 +327,7 @@ public class VirtualHostMessageStoreTest
 
         //test that removing the queue means it is not recovered next time
         final AMQQueue<?> queue = getVirtualHost().getQueue(durableQueueName);
-        DurableConfigurationStoreHelper.removeQueue(getVirtualHost().getDurableConfigurationStore(),queue);
+        getVirtualHost().getDurableConfigurationStore().remove(queue.asObjectRecord());
 
         reloadVirtualHost();
 
@@ -378,7 +378,7 @@ public class VirtualHostMessageStoreTest
 
         //test that removing the exchange means it is not recovered next time
         final ExchangeImpl<?> exchange = getVirtualHost().getExchange(directExchangeName);
-        DurableConfigurationStoreHelper.removeExchange(getVirtualHost().getDurableConfigurationStore(),
exchange);
+        getVirtualHost().getDurableConfigurationStore().remove(exchange.asObjectRecord());
 
         reloadVirtualHost();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message