diff options
Diffstat (limited to 'qpid/java')
4 files changed, 13 insertions, 14 deletions
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java index b1444d0f17..f68532b1d8 100644 --- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java +++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java @@ -27,6 +27,8 @@ import java.util.Set; import java.util.UUID; import java.util.concurrent.ScheduledFuture; +import com.google.common.util.concurrent.ListenableFuture; + import org.apache.qpid.server.connection.IConnectionRegistry; import org.apache.qpid.server.exchange.ExchangeImpl; import org.apache.qpid.server.logging.EventLogger; @@ -121,9 +123,9 @@ public class BDBHAReplicaVirtualHostImpl extends AbstractConfiguredObject<BDBHAR } @Override - protected <C extends ConfiguredObject> C addChild(final Class<C> childClass, - final Map<String, Object> attributes, - final ConfiguredObject... otherParents) + protected <C extends ConfiguredObject> ListenableFuture<C> addChildAsync(final Class<C> childClass, + final Map<String, Object> attributes, + final ConfiguredObject... otherParents) { throwUnsupportedForReplica(); return null; diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java index 20c59ddf6a..9b5aef5405 100644 --- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java +++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java @@ -276,14 +276,14 @@ public class BDBHAVirtualHostNodeImpl extends AbstractVirtualHostNode<BDBHAVirtu @SuppressWarnings({ "rawtypes", "unchecked" }) @Override - protected <C extends ConfiguredObject> C addChild(Class<C> childClass, Map<String, Object> attributes, + protected <C extends ConfiguredObject> ListenableFuture<C> addChildAsync(Class<C> childClass, Map<String, Object> attributes, ConfiguredObject... otherParents) { if(childClass == VirtualHost.class) { - return (C) getObjectFactory().create(VirtualHost.class, attributes, this); + return getObjectFactory().createAsync(childClass, attributes, this); } - return super.addChild(childClass, attributes, otherParents); + return super.addChildAsync(childClass, attributes, otherParents); } @Override diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java index 731cfd0895..262b0c2e9c 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java @@ -1696,11 +1696,6 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im } - protected <C extends ConfiguredObject> C addChild(Class<C> childClass, Map<String, Object> attributes, ConfiguredObject... otherParents) - { - throw new UnsupportedOperationException(); - } - protected <C extends ConfiguredObject> ListenableFuture<C> addChildAsync(Class<C> childClass, Map<String, Object> attributes, ConfiguredObject... otherParents) { throw new UnsupportedOperationException(); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java index b6ace28dd2..8f48a8dc57 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java @@ -28,6 +28,8 @@ import java.util.Set; import java.util.UUID; import java.util.concurrent.ScheduledFuture; +import com.google.common.util.concurrent.ListenableFuture; + import org.apache.qpid.server.connection.IConnectionRegistry; import org.apache.qpid.server.exchange.ExchangeImpl; import org.apache.qpid.server.logging.EventLogger; @@ -121,9 +123,9 @@ class RedirectingVirtualHostImpl } @Override - protected <C extends ConfiguredObject> C addChild(final Class<C> childClass, - final Map<String, Object> attributes, - final ConfiguredObject... otherParents) + protected <C extends ConfiguredObject> ListenableFuture<C> addChildAsync(final Class<C> childClass, + final Map<String, Object> attributes, + final ConfiguredObject... otherParents) { throwUnsupportedForRedirector(); return null; |
