jgroup.upgrade
Class UpgradeLayer

java.lang.Object
  extended by jgroup.upgrade.UpgradeLayer
All Implemented Interfaces:
java.rmi.Remote, ExternalGMIListener, Layer, MembershipListener, UpgradeService

public class UpgradeLayer
extends java.lang.Object
implements MembershipListener, UpgradeService

The UpgradeLayer allows server replicas to be upgraded with new software versions. This layer implements the RecoveryListener, causing the group manager construction to invoke the initReplica method on the recovery layer so as to initialize the replica and join the object group and also bind it with the dependable registry. For this layer, the UpgradeService interface extends the ExternalGMIListener so as to be able to communicate with the external upgrade manager. This however, prevents us from having the Layer interface in the UpgradeService definition, since this is a Remote interface, and thus needs to have its methods declare a RemoteException.

Since:
Jgroup 2.1
Author:
Marcin Solarski, Hein Meling

Nested Class Summary
 
Nested classes/interfaces inherited from interface jgroup.core.MembershipListener
MembershipListener.AllowDuplicateViews
 
Nested classes/interfaces inherited from interface jgroup.core.Layer
Layer.FinalizeLayer
 
Field Summary
 
Fields inherited from interface jgroup.upgrade.UpgradeService
UPGRADE_SERVICE
 
Method Summary
 void addListener(java.lang.Object listener)
          Add a listener object for upgraded events.
static UpgradeLayer getLayer(MembershipService pgms, RegistryService regs, ExternalGMIService egmi)
           
 void hasLeft()
          Upcall that is invoked by Jgroup to acknowledge the fact that an object is not member of a group any more more:
 void prepareChange()
          Currently not implemented.
 void upgradeRequest(AppConfig newApp)
          The upgradeRequest method will initiate the upgrade of the given application group to the new specified application class.
 void viewChange(View view)
          Upcall that is invoked by Jgroup when a view change occur in this replica's object group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLayer

public static UpgradeLayer getLayer(MembershipService pgms,
                                    RegistryService regs,
                                    ExternalGMIService egmi)
                             throws JgroupException,
                                    java.rmi.RemoteException
Throws:
JgroupException
java.rmi.RemoteException

addListener

public void addListener(java.lang.Object listener)
Add a listener object for upgraded events.

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.

upgradeRequest

@Multicast
public void upgradeRequest(AppConfig newApp)
                    throws java.rmi.RemoteException,
                           UnknownGroupException,
                           ExecException
The upgradeRequest method will initiate the upgrade of the given application group to the new specified application class. This method is invoked through the EGMI layer, so the upgrade manager must obtain a reference to this layer in order to request an upgrade.

Specified by:
upgradeRequest in interface UpgradeService
Throws:
UnknownGroupException - Raised if the specified application does not this replicas group.
java.rmi.RemoteException
ExecException

viewChange

public void viewChange(View view)
Upcall that is invoked by Jgroup when a view change occur in this replica's object group.

Specified by:
viewChange in interface MembershipListener
Parameters:
view - The new view object group.
See Also:
MembershipService

hasLeft

public void hasLeft()
Upcall that is invoked by Jgroup to acknowledge the fact that an object is not member of a group any more more:

Specified by:
hasLeft in interface MembershipListener
See Also:
MembershipService

prepareChange

public void prepareChange()
Currently not implemented.

Specified by:
prepareChange in interface MembershipListener
See Also:
MembershipService


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