org.apache.helix.ClusterMessagingService |
Known Indirect Subclasses |
Provides the ability to
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This will generate all messages to be sent given the recipientCriteria and MessageTemplate,
the messages are not sent.
| |||||||||||
This will register a message handler factory to create handlers for
message.
| |||||||||||
This will send the message to all instances matching the criteria
When there is a reply to the message sent AsyncCallback.onReply will be invoked. | |||||||||||
Send message matching the specifications mentioned in recipientCriteria.
| |||||||||||
This will send the message to all instances matching the criteria
When there is a reply to the message sent AsynCallback.onReply will be invoked. |
This will generate all messages to be sent given the recipientCriteria and MessageTemplate, the messages are not sent.
messageTemplate | the Message on which to base the messages to send |
---|
This will register a message handler factory to create handlers for message. In case client code defines its own message type, it can define a message handler factory to create handlers to process those messages. Messages are processed in a threadpool which is hosted by cluster manager, and cluster manager will call the factory to create handler, and the handler is called in the threadpool. Note that only one message handler factory can be registered with one message type.
type | The message type that the factory will create handler for |
---|---|
factory | The per-type message factory |
retryCount | maximum number of times to retry the send |
---|
This will send the message to all instances matching the criteria
When there is a reply to the message sent AsyncCallback.onReply will be
invoked. Application can specify a timeout on AsyncCallback. After every
reply is processed AsyncCallback.isDone will be invoked.
This method will return after sending the messages.
This is useful when message need to be sent and current thread need not
wait for response since processing will be done in another thread.
callbackOnReply | callback to trigger on completion |
---|---|
timeOut | Time to wait before failing the send |
Send message matching the specifications mentioned in recipientCriteria.
message | message to be sent. Some attributes of this message will be changed as required |
---|
This will send the message to all instances matching the criteria
When there is a reply to the message sent AsynCallback.onReply will be
invoked. Application can specify a timeout on AsyncCallback. After every
reply is processed AsyncCallback.isDone will be invoked.
This method will return only after the AsyncCallback.isDone() returns true
This is useful when message need to be sent and current thread has to wait
for response.
The current thread can use callbackOnReply instance to store application
specific data.