Repository: incubator-rocketmq Updated Branches: refs/heads/spec 30ada7bd6 -> f3d7a1e61
[ROCKETMQ-17] openmessaging: optimize ResourceManager ASF JIRA: https://issues.apache.org/jira/browse/ROCKETMQ-17 Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/f3d7a1e6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/f3d7a1e6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/f3d7a1e6 Branch: refs/heads/spec Commit: f3d7a1e611b571d9a4798fdff82f65f24eef25ea Parents: 30ada7b Author: vintagewang <[email protected]> Authored: Sat Jan 7 21:51:45 2017 +0800 Committer: vintagewang <[email protected]> Committed: Sat Jan 7 21:51:45 2017 +0800 ---------------------------------------------------------------------- .../apache/openmessaging/ResourceManager.java | 12 ++++++++++-- .../exception/OMSResourceNotExistException.java | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/f3d7a1e6/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/ResourceManager.java ---------------------------------------------------------------------- diff --git a/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/ResourceManager.java b/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/ResourceManager.java index 9657035..d8d066a 100644 --- a/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/ResourceManager.java +++ b/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/ResourceManager.java @@ -16,16 +16,24 @@ */ package org.apache.openmessaging; +import org.apache.openmessaging.exception.OMSResourceNotExistException; + public interface ResourceManager { - void createAndUpdateNamespace(final String nsname, KeyValue properties); + void createAndUpdateNamespace(final String nsName, KeyValue properties); void createAndUpdateTopic(final String topicName, KeyValue properties); void createAndUpdateQueue(final String queueName, KeyValue properties); - void destroyNamespace(final String nsname); + void destroyNamespace(final String nsName); void destroyTopic(final String topicName); void destroyQueue(final String queueName); + + KeyValue getNamespaceProperties(final String nsName) throws OMSResourceNotExistException; + + KeyValue getTopicProperties(final String topicName) throws OMSResourceNotExistException; + + KeyValue getQueueProperties(final String queueName) throws OMSResourceNotExistException; } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/f3d7a1e6/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/exception/OMSResourceNotExistException.java ---------------------------------------------------------------------- diff --git a/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/exception/OMSResourceNotExistException.java b/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/exception/OMSResourceNotExistException.java new file mode 100644 index 0000000..1eb46e6 --- /dev/null +++ b/spec/code/messaging-user-level-api/java/src/main/java/org/apache/openmessaging/exception/OMSResourceNotExistException.java @@ -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. + */ +package org.apache.openmessaging.exception; + +public class OMSResourceNotExistException extends OMSException { +}
