jgroup.relacs.gmi
Class GroupAckListenerOld

java.lang.Object
  extended by jgroup.relacs.gmi.GroupAckListenerOld
All Implemented Interfaces:
java.rmi.Remote, AckListener

public class GroupAckListenerOld
extends java.lang.Object
implements AckListener

Handler for multicast return messages from all members of the current view.

Author:
Hein Meling, Tor Arve Stangeland

Field Summary
protected  boolean[] completed
          Flag completed servers
protected  java.lang.Object[] results
          Results from servers
 
Constructor Summary
GroupAckListenerOld(java.lang.Object lockObj)
           
 
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.
 java.lang.Object getLeaderResult()
          Retrieves the invocation result obtained from the leader.
 AckListener getRemoteAckListener()
          Get a reference for the remote AckListener.
 java.lang.Object getResult()
          Retrieves the invocation result of any completed member.
 java.lang.Object[] getResults()
          Retrieves the whole array of invocation results (from all members).
 void notifyView(View view)
          Upcalls invoked by Jgroup to notify the ack listener about the view in which the multicast message is delivered.
protected  void pendingCompletion()
          Blocks until the state of the listener is COMPLETED.
 java.lang.String toString()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

results

protected java.lang.Object[] results
Results from servers


completed

protected boolean[] completed
Flag completed servers

Constructor Detail

GroupAckListenerOld

public GroupAckListenerOld(java.lang.Object lockObj)
Method Detail

getRemoteAckListener

public AckListener getRemoteAckListener()
                                 throws java.rmi.server.ExportException
Get a reference for the remote AckListener.

Returns:
A remote proxy for the AckListener.
Throws:
java.rmi.server.ExportException - Raised if the AckListener could not be exported.

ack

public void ack(MemberId id,
                int pos,
                java.lang.Object obj)
         throws java.rmi.RemoteException
Description copied from interface: AckListener
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.

Specified by:
ack in interface AckListener
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

notifyView

public void notifyView(View view)
                throws java.rmi.RemoteException
Description copied from interface: AckListener
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.

Specified by:
notifyView in interface AckListener
Parameters:
view - the view in which the multicast message is delivered
Throws:
java.rmi.RemoteException

viewChange

public void viewChange()
                throws java.rmi.RemoteException
Description copied from interface: AckListener
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.

Specified by:
viewChange in interface AckListener
Throws:
java.rmi.RemoteException

getResult

public java.lang.Object getResult()
Retrieves the invocation result of any completed member.


getLeaderResult

public java.lang.Object getLeaderResult()
Retrieves the invocation result obtained from the leader.


getResults

public java.lang.Object[] getResults()
Retrieves the whole array of invocation results (from all members). The results array may contain one or more Exceptions.


pendingCompletion

protected void pendingCompletion()
Blocks until the state of the listener is COMPLETED.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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