| Modifier | Constructor and Description |
|---|---|
protected |
RedissonTopic(ConnectionManager connectionManager,
String name) |
| Modifier and Type | Method and Description |
|---|---|
int |
addListener(MessageListener<M> listener)
Subscribes to this topic.
|
void |
delete()
Deletes the object
|
String |
getName()
Returns name of object
|
protected <V> io.netty.util.concurrent.Promise<V> |
newPromise() |
long |
publish(M message)
Publish the message to all subscribers of this topic
|
io.netty.util.concurrent.Future<Long> |
publishAsync(M message)
Publish the message to all subscribers of this topic asynchronously
|
void |
removeListener(int listenerId)
Removes the listener by
id for listening this topic |
protected RedissonTopic(ConnectionManager connectionManager, String name)
public long publish(M message)
RTopicpublic io.netty.util.concurrent.Future<Long> publishAsync(M message)
RTopicpublishAsync in interface RTopic<M>Future object with number of clients that received the messagepublic int addListener(MessageListener<M> listener)
RTopicMessageListener.onMessage is called when any message
is published on this topic.addListener in interface RTopic<M>MessageListenerpublic void removeListener(int listenerId)
RTopicid for listening this topicremoveListener in interface RTopic<M>public void delete()
RObjectprotected <V> io.netty.util.concurrent.Promise<V> newPromise()
Copyright © 2014–2015. All rights reserved.