jgroup.core.arm
Interface ReplicationManager

All Superinterfaces:
ExternalGMIListener, java.rmi.Remote
All Known Implementing Classes:
ReplicaManagerImpl

public interface ReplicationManager
extends ExternalGMIListener

The ReplicationManager interface describes the methods that a management client can invoke on the replication manager to create and remove object groups within the distributed system. Note that all methods in this interface has no declared invocation semantics. The invocation semantics depends on the implementation of this interface, and the ReplicaManagerImpl class provides one such implementation in which all methods are defined to have @Multicast invocation semantics. However, in this implementation of this interface only the leader replica actually perform the create and remove replica operations on the execution service, while the follower replicas just keeps track of the state by updating its own group table. The above semantics require the replica distribution scheme to perform deterministic replica placements. The ReplicationManager interface also describe the methods that ARM components, such as the RecoveryLayer and ExecDaemon can invoke on the replication manager to notify it of certain events.

Since:
Jgroup 1.2
Author:
Hein Meling

Nested Class Summary
static interface ReplicationManager.ManagementCallback
          Callback interface for monitoring installed applications.
 
Method Summary
 int createGroup(AppConfig app)
          Create a group for the specified application, with the applications required redundancy.
 void notifyEvent(ARMEvent event)
          The notifyEvent method is used by components external to the replication manager to notify it of important events, such as the presence of a new host (ExecDaemon) or view change events from the RecoveryLayer.
 void removeGroup(AppConfig app)
          Remove the group for the given application.
 void subscribe(ReplicationManager.ManagementCallback callback, int group)
          Register to receive notifications for the given group.
 void unsubscribe(int group)
          Unregister to receive notifications for the given group.
 void updateGroup(AppConfig app)
          Update the replication policy for the group for the given application.
 

Method Detail

notifyEvent

void notifyEvent(ARMEvent event)
                 throws java.rmi.RemoteException,
                        java.lang.Exception
The notifyEvent method is used by components external to the replication manager to notify it of important events, such as the presence of a new host (ExecDaemon) or view change events from the RecoveryLayer.

The method takes arbitrary event types as long as they implement the interface ARMEvent.

Parameters:
event - An event notification for the replication manager.
Throws:
java.rmi.RemoteException - Raised if the remote operation failed.
java.lang.Exception

createGroup

int createGroup(AppConfig app)
                throws java.rmi.RemoteException,
                       RedundancyException,
                       GroupExistsException
Create a group for the specified application, with the applications required redundancy.

Parameters:
app - The application details required to create a group for it.
Returns:
The group identifier.
Throws:
java.rmi.RemoteException - Raised if there was communication problems; only when invoked remotely.
ConfigurationException - Raised if the specified application recovery strategy could not be initialized.
RedundancyException - Raised if the specified redundancy could not be satisfied.
GroupExistsException - Raised if the specified group already exists.

removeGroup

void removeGroup(AppConfig app)
                 throws java.rmi.RemoteException,
                        UnknownGroupException
Remove the group for the given application.

Parameters:
app - The application group to remove.
Throws:
java.rmi.RemoteException - Raised if there was communication problems; only when invoked remotely.
UnknownGroupException - Raised if the specified application has no group in the system.

updateGroup

void updateGroup(AppConfig app)
                 throws java.rmi.RemoteException,
                        UnknownGroupException
Update the replication policy for the group for the given application.

Parameters:
app - The application group to remove.
Throws:
java.rmi.RemoteException - Raised if there was communication problems; only when invoked remotely.
UnknownGroupException - Raised if the specified application has no group in the system.

subscribe

void subscribe(ReplicationManager.ManagementCallback callback,
               int group)
               throws java.rmi.RemoteException,
                      UnknownGroupException
Register to receive notifications for the given group.

Parameters:
callback - The callback server (typically a management client)
group - The group for which notifications are desired
Throws:
java.rmi.RemoteException - Raised if there was communication problems; only when invoked remotely.
UnknownGroupException - Raised if the specified application has no group in the system.

unsubscribe

void unsubscribe(int group)
                 throws java.rmi.RemoteException,
                        UnknownGroupException
Unregister to receive notifications for the given group.

Parameters:
group - The group for which notifications are no longer desired
Throws:
java.rmi.RemoteException - Raised if there was communication problems; only when invoked remotely.
UnknownGroupException - Raised if the specified application has no group in the system.


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