From e49bbdff59a7ed6d82e5015a8760c1d1248981b2 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Sun, 10 Mar 2013 22:29:04 +0000 Subject: QPID-4390: move the store factory interface beside the other plugin factory interfaces git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1454937 13f79535-47bb-0310-9956-ffa450edef68 --- .../store/berkeleydb/BDBMessageStoreFactory.java | 2 +- ...g.apache.qpid.server.plugin.MessageStoreFactory | 19 ++++++++++++++ ...rg.apache.qpid.server.store.MessageStoreFactory | 19 -------------- .../qpid/server/plugin/MessageStoreFactory.java | 30 ++++++++++++++++++++++ .../server/store/MemoryMessageStoreFactory.java | 1 + .../qpid/server/store/MessageStoreCreator.java | 1 + .../qpid/server/store/MessageStoreFactory.java | 28 -------------------- .../store/derby/DerbyMessageStoreFactory.java | 2 +- ...g.apache.qpid.server.plugin.MessageStoreFactory | 20 +++++++++++++++ ...rg.apache.qpid.server.store.MessageStoreFactory | 20 --------------- .../apache/qpid/test/utils/QpidBrokerTestCase.java | 2 +- 11 files changed, 74 insertions(+), 70 deletions(-) create mode 100644 qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory delete mode 100644 qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory create mode 100644 qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java delete mode 100644 qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreFactory.java create mode 100644 qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory delete mode 100644 qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory (limited to 'qpid/java') diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java index 126bf1928a..ef886d3d6d 100644 --- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java +++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java @@ -20,8 +20,8 @@ */ package org.apache.qpid.server.store.berkeleydb; +import org.apache.qpid.server.plugin.MessageStoreFactory; import org.apache.qpid.server.store.MessageStore; -import org.apache.qpid.server.store.MessageStoreFactory; public class BDBMessageStoreFactory implements MessageStoreFactory { diff --git a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory new file mode 100644 index 0000000000..a822405565 --- /dev/null +++ b/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory @@ -0,0 +1,19 @@ +# +# 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. +# +org.apache.qpid.server.store.berkeleydb.BDBMessageStoreFactory diff --git a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory b/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory deleted file mode 100644 index a822405565..0000000000 --- a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory +++ /dev/null @@ -1,19 +0,0 @@ -# -# 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. -# -org.apache.qpid.server.store.berkeleydb.BDBMessageStoreFactory diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java new file mode 100644 index 0000000000..aff06af4ce --- /dev/null +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java @@ -0,0 +1,30 @@ +/* + * + * 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.plugin; + +import org.apache.qpid.server.store.MessageStore; + +public interface MessageStoreFactory +{ + String getType(); + + MessageStore createMessageStore(); +} diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java index 20b6b7a8a6..dceba4af31 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java @@ -20,6 +20,7 @@ */ package org.apache.qpid.server.store; +import org.apache.qpid.server.plugin.MessageStoreFactory; public class MemoryMessageStoreFactory implements MessageStoreFactory { diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java index 0d5a4850f6..0bc83c89d2 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.qpid.server.configuration.IllegalConfigurationException; +import org.apache.qpid.server.plugin.MessageStoreFactory; import org.apache.qpid.server.plugin.QpidServiceLoader; public class MessageStoreCreator diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreFactory.java deleted file mode 100644 index a1afd02f12..0000000000 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * 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.store; - -public interface MessageStoreFactory -{ - String getType(); - - MessageStore createMessageStore(); -} diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java index 046b503d8a..81e5bb9ff9 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java @@ -20,8 +20,8 @@ */ package org.apache.qpid.server.store.derby; +import org.apache.qpid.server.plugin.MessageStoreFactory; import org.apache.qpid.server.store.MessageStore; -import org.apache.qpid.server.store.MessageStoreFactory; public class DerbyMessageStoreFactory implements MessageStoreFactory { diff --git a/qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory new file mode 100644 index 0000000000..1357f816b7 --- /dev/null +++ b/qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory @@ -0,0 +1,20 @@ +# +# 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. +# +org.apache.qpid.server.store.derby.DerbyMessageStoreFactory +org.apache.qpid.server.store.MemoryMessageStoreFactory \ No newline at end of file diff --git a/qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory b/qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory deleted file mode 100644 index 1357f816b7..0000000000 --- a/qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.store.MessageStoreFactory +++ /dev/null @@ -1,20 +0,0 @@ -# -# 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. -# -org.apache.qpid.server.store.derby.DerbyMessageStoreFactory -org.apache.qpid.server.store.MemoryMessageStoreFactory \ No newline at end of file diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java index 394fed7d47..ba7fac3312 100755 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java @@ -64,11 +64,11 @@ import org.apache.qpid.server.BrokerOptions; import org.apache.qpid.server.configuration.BrokerProperties; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.VirtualHost; +import org.apache.qpid.server.plugin.MessageStoreFactory; import org.apache.qpid.server.protocol.AmqpProtocolVersion; import org.apache.qpid.server.store.MemoryMessageStore; import org.apache.qpid.server.store.MessageStoreConstants; import org.apache.qpid.server.store.MessageStoreCreator; -import org.apache.qpid.server.store.MessageStoreFactory; import org.apache.qpid.server.store.derby.DerbyMessageStore; import org.apache.qpid.url.URLSyntaxException; import org.apache.qpid.util.FileUtils; -- cgit v1.2.1