ensemble
Class Group

java.lang.Object
  |
  +--ensemble.Group

public class Group
extends java.lang.Object

An Ensemble Process Group. This class provides a Java wrapper to an Ensemble process group. A group is constructed by providing a set of callbacks performed by Ensemble when certain events occur:

The actions supported on a group are:


Field Summary
static int BLOCKED
           
static int JOINING
           
static int LEAVING
           
static int LEFT
           
 long nat_env
           
static int NORMAL
           
static int PRE
           
 
Constructor Summary
Group(ensemble.Callbacks cb)
           
 
Method Summary
 void cast(byte[] msg)
          Multicast a message to the group.
 void changeProperties(java.lang.String properties)
          Request a change of the group-communication stack.
 void changeProtocol(java.lang.String protocol_name)
          Request a change of the group-communication stack.
 int getStatus()
           
static void init(java.lang.String[] args)
          Initialize the low-level Ensemble C-library.
 void join(ensemble.JoinOps jops)
          Join a group.
 void leave()
          Leave a group.
 void prompt()
          Ask Ensemble to perform a View change.
 void rekey()
          Request a rekey.
 void send(int[] dests, byte[] msg)
          Send a point-to-point message to a list of group members.
 void send1(int dest, byte[] msg)
          Send a point-to-point message to a sinle member.
 java.lang.String string_of_status(int stat)
           
 void suspect(int[] suspects)
          Tell Ensemble you suspect a list of members.
 void xferDone()
          Inform Ensemble that state-transfer has been completed at this group member.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRE

public static final int PRE
See Also:
Constant Field Values

JOINING

public static final int JOINING
See Also:
Constant Field Values

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

BLOCKED

public static final int BLOCKED
See Also:
Constant Field Values

LEAVING

public static final int LEAVING
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

nat_env

public long nat_env
Constructor Detail

Group

public Group(ensemble.Callbacks cb)
Method Detail

string_of_status

public final java.lang.String string_of_status(int stat)

getStatus

public int getStatus()

join

public void join(ensemble.JoinOps jops)
Join a group.

Parameters:
jops - The join options passed to Ensemble.

leave

public void leave()
Leave a group. After performing the call, no other actions are allowed for this group. You may not send/cast/etc. to this group.


cast

public void cast(byte[] msg)
Multicast a message to the group.

Parameters:
msg - The message body

send

public void send(int[] dests,
                 byte[] msg)
Send a point-to-point message to a list of group members.

Parameters:
dests - An array of destinations
msg - The message body

send1

public void send1(int dest,
                  byte[] msg)
Send a point-to-point message to a sinle member.

Parameters:
dest - The destination rank
msg - The message body

prompt

public void prompt()
Ask Ensemble to perform a View change.


suspect

public void suspect(int[] suspects)
Tell Ensemble you suspect a list of members. These members will be removed in the next view.

Parameters:
suspects - the list of suspected members

xferDone

public void xferDone()
Inform Ensemble that state-transfer has been completed at this group member. This requires that the Xfer layer is in the stack.


rekey

public void rekey()
Request a rekey.


changeProtocol

public void changeProtocol(java.lang.String protocol_name)
Request a change of the group-communication stack.

Parameters:
protocol_name - The new protocol

changeProperties

public void changeProperties(java.lang.String properties)
Request a change of the group-communication stack. The requested set of properties is provided.

Parameters:
properties - The new properties

init

public static void init(java.lang.String[] args)
Initialize the low-level Ensemble C-library.

Parameters:
args - The list of command line arguments