jgroup.core.multicast
Interface AckListener

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
AsynchAckListener, GroupAckListener, GroupAckListenerOld, SynchAckListener

public interface AckListener
extends java.rmi.Remote

This interface enables members to receive ack messages in response to multicasts. When a message is delivered, upcall methods deliverStream and deliverObject of interface MulticastListener are invoked. MulticastListener objects may respond to these invocations by returning an object, that will be delivered to the multicast sender through the AckListener interface.

Since:
Jgroup 0.8
Author:
Alberto Montresor

Method Summary
 void ack(MemberId id, int pos, java.lang.Object obj)
          Upcalls invoked by Jgroup to notify the ack listener that the member identified by id has responded with obj to the multicast message associated with this ack listener.
 void notifyView(View view)
          Upcalls invoked by Jgroup to notify the ack listener about the view in which the multicast message is delivered.
 void viewChange()
          Upcalls invoked by Jgroup to notify the ack listener that a new view has been installed after the view in which the message has been delivered.
 

Method Detail

notifyView

void notifyView(View view)
                throws java.rmi.RemoteException
Upcalls invoked by Jgroup to notify the ack listener about the view in which the multicast message is delivered. Note that following the Jgroup specification, a message may be delivered in a view different from the one in which the message has been multicast; this is motivated by the fact that during agreement protocols, no new messages can be delivered; in fact, cascading sequences of delivered messages could prevent the completion of agreement protocols.

This property corresponds to the Same View Delivery property of the GCS-Survery paper of Chockler et al, which states that all those who deliver a message must do so in the same view, however without requiring that this occur in the same view as it was sent.

Parameters:
view - the view in which the multicast message is delivered
Throws:
java.rmi.RemoteException

ack

void ack(MemberId id,
         int pos,
         java.lang.Object obj)
         throws java.rmi.RemoteException
Upcalls invoked by Jgroup to notify the ack listener that the member identified by id has responded with obj to the multicast message associated with this ack listener.

Member id is contained in the view notified by notifyView.

Parameters:
id - the identifier of the member responding to the multicast message
pos - position of the member in the last installed view
obj - the response message
Throws:
java.rmi.RemoteException

viewChange

void viewChange()
                throws java.rmi.RemoteException
Upcalls invoked by Jgroup to notify the ack listener that a new view has been installed after the view in which the message has been delivered. After this event, no missing response messages for the multicast message associated with this ack listener will ever be accepted.

Throws:
java.rmi.RemoteException


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.