org.objectweb.perseus.distribution.jgroups
Class JGroupsCoordinatorService

java.lang.Object
  extended byorg.objectweb.perseus.distribution.jgroups.JGroupsCoordinatorService
All Implemented Interfaces:
DistResCoordinatorService

public class JGroupsCoordinatorService
extends java.lang.Object
implements DistResCoordinatorService


Constructor Summary
JGroupsCoordinatorService(JGroupsService drs)
           
 
Method Summary
 java.io.Serializable getNodeId()
          Returns the id of the local node which can be sent in messages as it is serializable.
 void nodeFailed(Address nodeId)
           
 void sendToAllUsers(java.lang.Object rId, java.io.Serializable message)
          Asynchronously broadcasts a message to ALL users of a resource.
 void sendToUser(java.lang.Object rId, java.io.Serializable message, java.lang.Object user)
          Asynchronously sends a message to ONE user of a resource.
 void sendToUsers(java.lang.Object rId, java.io.Serializable message, java.util.Set users)
          Asynchronously multicasts a message to A SET OF users of a resource.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JGroupsCoordinatorService

public JGroupsCoordinatorService(JGroupsService drs)
Method Detail

sendToAllUsers

public void sendToAllUsers(java.lang.Object rId,
                           java.io.Serializable message)
                    throws NotCoordinatorException
Description copied from interface: DistResCoordinatorService
Asynchronously broadcasts a message to ALL users of a resource. A FIFO delivery is guaranteed for each resource, that is, the receive method of the coordinator(s) will be called in the same order that the call to this method with the same resource id.

Specified by:
sendToAllUsers in interface DistResCoordinatorService
Parameters:
rId - the id of the related resource
message - the message to be sent
Throws:
NotCoordinatorException

sendToUser

public void sendToUser(java.lang.Object rId,
                       java.io.Serializable message,
                       java.lang.Object user)
                throws NotCoordinatorException
Description copied from interface: DistResCoordinatorService
Asynchronously sends a message to ONE user of a resource. A FIFO delivery is guaranteed for each resource, that is, the receive method of the coordinator(s) will be called in the same order that the call to this method with the same resource id.

Specified by:
sendToUser in interface DistResCoordinatorService
Parameters:
rId - the id of the related resource
message - the message to be sent
user - the id of the user node to which the message is to be sent
Throws:
NotCoordinatorException

sendToUsers

public void sendToUsers(java.lang.Object rId,
                        java.io.Serializable message,
                        java.util.Set users)
                 throws NotCoordinatorException
Description copied from interface: DistResCoordinatorService
Asynchronously multicasts a message to A SET OF users of a resource. A FIFO delivery is guaranteed for each resource, that is, the receive method of the coordinator(s) will be called in the same order that the call to this method with the same resource id.

Specified by:
sendToUsers in interface DistResCoordinatorService
Parameters:
rId - the id of the related resource
message - the message to be sent
users - the set of users to which the message is to be sent
Throws:
NotCoordinatorException

getNodeId

public java.io.Serializable getNodeId()
Description copied from interface: DistResCoordinatorService
Returns the id of the local node which can be sent in messages as it is serializable.

Specified by:
getNodeId in interface DistResCoordinatorService
Returns:
the id of the local node

nodeFailed

public void nodeFailed(Address nodeId)

toString

public java.lang.String toString()


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.