public class NoOpClusterMessageService extends Object implements ClusterMessageService, ClusterMessageManager
Constructor and Description |
---|
NoOpClusterMessageService() |
Modifier and Type | Method and Description |
---|---|
void |
deleteMessagesOlderThan(Instant instant)
Removes all stored messages older than the specified instant
|
void |
deleteOldMessages()
Delete messages with timestamp older than an implementation-defined threshold.
|
List<InternalClusterMessage> |
getAllMessages() |
void |
publish(String message,
String channel)
Send a message to other nodes (excluding the sender), notifying all listeners on a specific channel.
|
void |
registerListener(ClusterMessageListener listener,
String channel)
Register a listener on a channel.
|
void |
start()
Start polling for new messages.
|
void |
stop()
Stop polling for new messages and ignore any late messages on start().
|
void |
unregisterListener(ClusterMessageListener listener)
Unregister a listener from all channels.
|
void |
unregisterListener(ClusterMessageListener listener,
String channel)
Unregister a listener from a specific channel.
|
public void start()
ClusterMessageManager
start
in interface ClusterMessageManager
public void stop()
ClusterMessageManager
stop
in interface ClusterMessageManager
public List<InternalClusterMessage> getAllMessages()
getAllMessages
in interface ClusterMessageManager
public void deleteOldMessages()
ClusterMessageManager
deleteOldMessages
in interface ClusterMessageManager
public void deleteMessagesOlderThan(Instant instant)
ClusterMessageManager
deleteMessagesOlderThan
in interface ClusterMessageManager
public void registerListener(ClusterMessageListener listener, String channel)
ClusterMessageService
registerListener
in interface ClusterMessageService
public void unregisterListener(ClusterMessageListener listener, String channel)
ClusterMessageService
unregisterListener
in interface ClusterMessageService
public void unregisterListener(ClusterMessageListener listener)
ClusterMessageService
unregisterListener
in interface ClusterMessageService
public void publish(String message, String channel)
ClusterMessageService
publish
in interface ClusterMessageService
message
- channel name, max. 64 characters.channel
- message content, max. 1024 characters.Copyright © 2020 Atlassian. All rights reserved.