ensemble
Interface Callbacks


public interface Callbacks

Callbacks binds together the list of callbacks a group has to implement. Each event is the application "answer" to a specific event.


Method Summary
 void block()
          The group is blocked in preparation for a view-change.
 void exit()
          The group is leaving, and this is the final callback to the group.
 void flow_block(int rank, boolean onoff)
          Too many messages are being sent to a specific destination, or to the whole group.
 void heartbeat(double time)
          Every predetemined timeout, this callback is invoked with the current time.
 void install(ensemble.View view)
          A new view has been installed.
 void recv_cast(int origin, byte[] msg)
          A message has been received from the indicated origin.
 void recv_send(int origin, byte[] msg)
          A message has been received from the indicated origin.
 

Method Detail

install

public void install(ensemble.View view)
A new view has been installed.


exit

public void exit()
The group is leaving, and this is the final callback to the group.


recv_cast

public void recv_cast(int origin,
                      byte[] msg)
A message has been received from the indicated origin.

Parameters:
origin - message origin
msg - message body

recv_send

public void recv_send(int origin,
                      byte[] msg)
A message has been received from the indicated origin.

Parameters:
origin - message origin
msg - message body

flow_block

public void flow_block(int rank,
                       boolean onoff)
Too many messages are being sent to a specific destination, or to the whole group.

Parameters:
rank - the member to which we need to stop sending messages. (-1) for multicast traffic.
onoff - Should we stop (true), or continue (false)

block

public void block()
The group is blocked in preparation for a view-change. Stop sending messages until the install(ensemble.View) callback.


heartbeat

public void heartbeat(double time)
Every predetemined timeout, this callback is invoked with the current time.