Class NoOpClusterMessageService
java.lang.Object
com.atlassian.crowd.manager.cluster.message.NoOpClusterMessageService
- All Implemented Interfaces:
ClusterMessageManager
,ClusterMessageService
public class NoOpClusterMessageService
extends Object
implements ClusterMessageService, ClusterMessageManager
Dummy implementation used when running in non-clustered mode.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteMessagesOlderThan
(Instant instant) Removes all stored messages older than the specified instantvoid
Delete messages with timestamp older than an implementation-defined threshold.void
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.
-
Constructor Details
-
NoOpClusterMessageService
public NoOpClusterMessageService()
-
-
Method Details
-
start
public void start()Description copied from interface:ClusterMessageManager
Start polling for new messages.- Specified by:
start
in interfaceClusterMessageManager
-
stop
public void stop()Description copied from interface:ClusterMessageManager
Stop polling for new messages and ignore any late messages on start().- Specified by:
stop
in interfaceClusterMessageManager
-
getAllMessages
- Specified by:
getAllMessages
in interfaceClusterMessageManager
- Returns:
- all stored messages, including entries already processed or sent by the calling node.
-
deleteOldMessages
public void deleteOldMessages()Description copied from interface:ClusterMessageManager
Delete messages with timestamp older than an implementation-defined threshold.- Specified by:
deleteOldMessages
in interfaceClusterMessageManager
-
deleteMessagesOlderThan
Description copied from interface:ClusterMessageManager
Removes all stored messages older than the specified instant- Specified by:
deleteMessagesOlderThan
in interfaceClusterMessageManager
-
registerListener
Description copied from interface:ClusterMessageService
Register a listener on a channel.- Specified by:
registerListener
in interfaceClusterMessageService
-
unregisterListener
Description copied from interface:ClusterMessageService
Unregister a listener from a specific channel.- Specified by:
unregisterListener
in interfaceClusterMessageService
-
unregisterListener
Description copied from interface:ClusterMessageService
Unregister a listener from all channels.- Specified by:
unregisterListener
in interfaceClusterMessageService
-
publish
Description copied from interface:ClusterMessageService
Send a message to other nodes (excluding the sender), notifying all listeners on a specific channel.- Specified by:
publish
in interfaceClusterMessageService
- Parameters:
message
- channel name, max. 64 characters.channel
- message content, max. 1024 characters.
-