jgroup.relacs.gm
Class NotifyLayer

java.lang.Object
  extended by jgroup.relacs.gm.NotifyLayer
All Implemented Interfaces:
InternalGMIListener, Layer, Layer.FinalizeLayer, MembershipListener, InternalNotification, NotifyService

public class NotifyLayer
extends java.lang.Object
implements NotifyService, MembershipListener, InternalNotification

The NotifyLayer class keeps track of IIDs in the current view, and compares this to the previous. If any differences are found, the NotifyLayer will invoke an unbind on the dependable registry. Note that for this layer should occur before the recovery layer in the layer stack. This is since otherwise we may introduce a delay in the recovery layer view handling, and this may lead this layer to perform IGMI multicasts in such a manner that the membership service is unable to conclude a new view agreement protocol that has already been started, while processing the view in the recovery layer.

Since:
Jgroup 2.1
Author:
Henning Hommeland, Jo Andreas Lind

Nested Class Summary
 
Nested classes/interfaces inherited from interface jgroup.core.Layer
Layer.FinalizeLayer
 
Nested classes/interfaces inherited from interface jgroup.core.MembershipListener
MembershipListener.AllowDuplicateViews
 
Constructor Summary
NotifyLayer(GroupManager gm, RegistryService rs, MembershipService ms)
          Initializes a NotifyLayer
 
Method Summary
 void addListener(java.lang.Object listener)
          Add a listener to this layer.
 void complete(java.lang.Object server)
          Complete the replica initialization, once all group manager components have been initialized.
 java.lang.Object getIID()
          This method returns the IID for this layer
static NotifyLayer getLayer(GroupManager gm, RegistryService rs, MembershipService ms, InternalGMIService igmi)
           
 void hasLeft()
          Upcall that is invoked by Jgroup to acknowledge the fact that this object has left the group.
 void prepareChange()
          Upcall that is invoked by the group membership service to notify that the current view is not valid any more, and the group membership service is trying to reach an agreement on a new view.
 void viewChange(View view)
          The viewChange() method is invoked on the whole server group when a view change occur.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifyLayer

public NotifyLayer(GroupManager gm,
                   RegistryService rs,
                   MembershipService ms)
Initializes a NotifyLayer

Method Detail

getLayer

public static NotifyLayer getLayer(GroupManager gm,
                                   RegistryService rs,
                                   MembershipService ms,
                                   InternalGMIService igmi)

addListener

public void addListener(java.lang.Object listener)
Description copied from interface: Layer
Add a listener to this layer. Many layers require to be notified of events produced by other layers in order to provide its own functionallity, and this method must be invoked to notify this layer of an interested listener. A listener may be another layer or an application server replica.

Specified by:
addListener in interface Layer
Parameters:
listener - An Object representation of the listener interface. This will typically be cast to the appropriate listener interface type after checking the type with the instanceof operator.

complete

public void complete(java.lang.Object server)
              throws JgroupException
Complete the replica initialization, once all group manager components have been initialized.

Specified by:
complete in interface Layer.FinalizeLayer
Parameters:
server - The server using a layer implementing the FinalizeLayer interface.
Throws:
JgroupException - Thrown if the layer could not be completed.

getIID

public java.lang.Object getIID()
                        throws java.rmi.RemoteException
This method returns the IID for this layer

Specified by:
getIID in interface InternalNotification
Throws:
java.rmi.RemoteException

viewChange

public void viewChange(View view)
The viewChange() method is invoked on the whole server group when a view change occur.

Specified by:
viewChange in interface MembershipListener
Parameters:
view - The new view that has been installed.
See Also:
MembershipService

hasLeft

public void hasLeft()
Description copied from interface: MembershipListener
Upcall that is invoked by Jgroup to acknowledge the fact that this object has left the group. This method is only invoked after the leave method has been invoked on the group membership service.

Specified by:
hasLeft in interface MembershipListener
See Also:
MembershipService

prepareChange

public void prepareChange()
Description copied from interface: MembershipListener
Upcall that is invoked by the group membership service to notify that the current view is not valid any more, and the group membership service is trying to reach an agreement on a new view.

Specified by:
prepareChange in interface MembershipListener
See Also:
MembershipService


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