|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the coordinator side interface of the distributed resource service. A coordinator must use this interface to exchange messages with users. Note that the coordinator should only send messages in response to user requests and not in an autonomous manner. Not respecting this rule could prevent coordination migrations and replications from terminating. This is because messages may need to be flushed so as to preserve a FIFO delivery order (see the JGroups implementation for example).
Method Summary | |
java.io.Serializable |
getNodeId()
Returns the id of the local node which can be sent in messages as it is serializable. |
void |
sendToAllUsers(java.lang.Object resId,
java.io.Serializable message)
Asynchronously broadcasts a message to ALL users of a resource. |
void |
sendToUser(java.lang.Object resId,
java.io.Serializable message,
java.lang.Object nodeId)
Asynchronously sends a message to ONE user of a resource. |
void |
sendToUsers(java.lang.Object resId,
java.io.Serializable message,
java.util.Set nodeIds)
Asynchronously multicasts a message to A SET OF users of a resource. |
Method Detail |
public void sendToAllUsers(java.lang.Object resId, java.io.Serializable message) throws NotCoordinatorException
resId
- the id of the related resourcemessage
- the message to be sent
NotCoordinatorException
public void sendToUser(java.lang.Object resId, java.io.Serializable message, java.lang.Object nodeId) throws NotCoordinatorException
resId
- the id of the related resourcemessage
- the message to be sentnodeId
- the id of the user node to which the message is to be sent
NotCoordinatorException
public void sendToUsers(java.lang.Object resId, java.io.Serializable message, java.util.Set nodeIds) throws NotCoordinatorException
resId
- the id of the related resourcemessage
- the message to be sentnodeIds
- the set of users to which the message is to be sent
NotCoordinatorException
public java.io.Serializable getNodeId()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |