java.lang.Object | |
↳ | com.atlassian.jira.cluster.OfBizMessageHandlerService |
Provides an implementation for the ClusterMessagingService
that uses OfBiz to
manage the message queue in the database and holds any listeners via a weak reference so that it doesn't keep
listeners alive across plugin restarts, etc.
Polls the database on a regular interval to see if there are actions to perform
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Register a ClusterMessageConsumer to receive messages sent to the nominated channel.
| |||||||||||
Sends an inter-node message to registered listeners, listeners on the node the message was raised will not be
notified.
| |||||||||||
Removes a ClusterMessageConsumer from all channels.
| |||||||||||
Removes a ClusterMessageConsumer from the channel.
|
[Expand]
Inherited Methods | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object | |||||||||||||||||||
From interface
com.atlassian.jira.cluster.ClusterMessagingService
| |||||||||||||||||||
From interface
com.atlassian.jira.cluster.MessageHandlerService
|
Register a ClusterMessageConsumer to receive messages sent to the nominated channel. The receive method of the ClusterMessageConsumer will be invoked when a message is sent to a channel it is listening to. Registering a new listener for a channel will not remove any existing listeners on that channel. Listeners are weakly referenced, it is the responsibility of the caller to ensure that listeners are not prematurely garbage collected.
channel | The name of the channel |
---|---|
consumer | The consumer that will receive messages |
Sends an inter-node message to registered listeners, listeners on the node the message was raised will not be notified.
channel | The name of the channel (up to 20 alphanumeric characters in length) |
---|---|
message | The message to send (up to 200 characters in length) |
Removes a ClusterMessageConsumer from all channels. The ClusterMessageConsumer will no longer receive any messages.
consumer | The consumer to be unregistered |
---|
Removes a ClusterMessageConsumer from the channel. The ClusterMessageConsumer will no longer receive messages that are sent to the nominated channel.
channel | The name of the channel |
---|---|
consumer | The consumer to be unregistered |