diff options
| author | Keith Wall <kwall@apache.org> | 2014-06-06 15:44:20 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-06-06 15:44:20 +0000 |
| commit | 6ddaec7aa7ca032a47144aa3148497367dd70d3b (patch) | |
| tree | 5e1f5919407db4331340a0a66e7a0c9cad88ce73 /qpid/java/bdbstore | |
| parent | 386c80ed77f3d91903c563e0727dbf2a1b09fc2b (diff) | |
| download | qpid-python-6ddaec7aa7ca032a47144aa3148497367dd70d3b.tar.gz | |
QPID-5802: [Java Broker] Introduce separate VirtualHost types
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1600936 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/bdbstore')
2 files changed, 68 insertions, 6 deletions
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBVirtualHost.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBVirtualHost.java new file mode 100644 index 0000000000..51fdcd1f2b --- /dev/null +++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBVirtualHost.java @@ -0,0 +1,68 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.qpid.server.virtualhost.berkeleydb; + +import java.util.Map; + +import org.apache.qpid.server.logging.subjects.MessageStoreLogSubject; +import org.apache.qpid.server.model.ManagedObject; +import org.apache.qpid.server.model.ManagedObjectFactoryConstructor; +import org.apache.qpid.server.model.VirtualHostNode; +import org.apache.qpid.server.store.MessageStore; +import org.apache.qpid.server.store.berkeleydb.BDBConfigurationStore; +import org.apache.qpid.server.virtualhost.AbstractVirtualHost; + +@ManagedObject(category = false, type = BDBVirtualHost.VIRTUAL_HOST_TYPE) +public class BDBVirtualHost extends AbstractVirtualHost<BDBVirtualHost> +{ + public static final String VIRTUAL_HOST_TYPE = "BDB"; + private MessageStore _messageStore; + private MessageStoreLogSubject _messageStoreLogSubject; + + @ManagedObjectFactoryConstructor + public BDBVirtualHost(final Map<String, Object> attributes, + final VirtualHostNode<?> virtualHostNode) + { + super(attributes, virtualHostNode); + } + + + @Override + protected void initialiseStorage() + { + _messageStore = new BDBConfigurationStore().getMessageStore(); + + _messageStoreLogSubject = new MessageStoreLogSubject(getName(), _messageStore.getClass().getSimpleName()); + + } + + @Override + protected MessageStoreLogSubject getMessageStoreLogSubject() + { + return _messageStoreLogSubject; + } + + @Override + public MessageStore getMessageStore() + { + return _messageStore; + } +} 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 d808cf9724..2eeedd63a1 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 @@ -150,12 +150,6 @@ public class BDBHAVirtualHostNodeImpl extends AbstractVirtualHostNode<BDBHAVirtu } @Override - public boolean isMessageStoreProvider() - { - return true; - } - - @Override public String getGroupName() { return _groupName; |
