public interface RTopicAsync
Modifier and Type | Method and Description |
---|---|
<M> RFuture<Integer> |
addListenerAsync(Class<M> type,
MessageListener<M> listener)
Subscribes to this topic.
|
RFuture<Integer> |
addListenerAsync(StatusListener listener)
Subscribes to status changes of this topic
|
RFuture<Long> |
countSubscribersAsync()
Returns amount of subscribers to this topic across all Redisson instances.
|
RFuture<Long> |
publishAsync(Object message)
Publish the message to all subscribers of this topic asynchronously
|
RFuture<Void> |
removeListenerAsync(int listenerId)
Removes the listener by
id for listening this topic |
RFuture<Void> |
removeListenerAsync(MessageListener<?> listener)
Removes the listener by its instance
|
RFuture<Long> publishAsync(Object message)
message
- to sendRFuture<Integer> addListenerAsync(StatusListener listener)
listener
- for messagesStatusListener
<M> RFuture<Integer> addListenerAsync(Class<M> type, MessageListener<M> listener)
MessageListener.onMessage
is called when any message
is published on this topic.M
- type of messagetype
- - type of messagelistener
- for messagesMessageListener
RFuture<Void> removeListenerAsync(int listenerId)
id
for listening this topiclistenerId
- - listener idRFuture<Void> removeListenerAsync(MessageListener<?> listener)
listener
- - listener instanceCopyright © 2014–2018 The Redisson Project. All rights reserved.