From 6afd7cd9e450bcfb4c03dea7efc24a2ab2469009 Mon Sep 17 00:00:00 2001 From: Nikita Date: Mon, 20 Jul 2015 11:20:15 +0300 Subject: [PATCH] RTopicAsync interface added. #186 --- src/main/java/org/redisson/core/RTopic.java | 12 +----- .../java/org/redisson/core/RTopicAsync.java | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 src/main/java/org/redisson/core/RTopicAsync.java diff --git a/src/main/java/org/redisson/core/RTopic.java b/src/main/java/org/redisson/core/RTopic.java index 3130e229a..bcc2c3939 100644 --- a/src/main/java/org/redisson/core/RTopic.java +++ b/src/main/java/org/redisson/core/RTopic.java @@ -15,8 +15,6 @@ */ package org.redisson.core; -import io.netty.util.concurrent.Future; - /** * Distributed topic. Messages are delivered to all message listeners across Redis cluster. * @@ -24,15 +22,7 @@ import io.netty.util.concurrent.Future; * * @param the type of message object */ -public interface RTopic extends RObject { - - /** - * Publish the message to all subscribers of this topic asynchronously - * - * @param message - * @return the Future object with number of clients that received the message - */ - Future publishAsync(M message); +public interface RTopic extends RTopicAsync { /** * Publish the message to all subscribers of this topic diff --git a/src/main/java/org/redisson/core/RTopicAsync.java b/src/main/java/org/redisson/core/RTopicAsync.java new file mode 100644 index 000000000..728e42f10 --- /dev/null +++ b/src/main/java/org/redisson/core/RTopicAsync.java @@ -0,0 +1,37 @@ +/** + * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * + * Licensed 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.redisson.core; + +import io.netty.util.concurrent.Future; + +/** + * Distributed topic. Messages are delivered to all message listeners across Redis cluster. + * + * @author Nikita Koksharov + * + * @param the type of message object + */ +public interface RTopicAsync extends RObjectAsync { + + /** + * Publish the message to all subscribers of this topic asynchronously + * + * @param message + * @return the Future object with number of clients that received the message + */ + Future publishAsync(M message); + +}