org.objectweb.carol.cmi.ha
Interface ReplicationManager

All Known Implementing Classes:
JGReplicator

public interface ReplicationManager

Interface with the replication functionality

Author:
Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es), Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es)

Method Summary
 void addModifiedBean(RequestId reqId, ObjectId bid, byte[] state)
          Correlates the changes made on a modified bean with a concrete client request
 void clear()
          Clears/removes the elements used by the concrete implementation
 void replicate(RequestId reqId, java.lang.Object response)
          Replicates the changes made on beans inside a concrete request context
 void replicateRemove(RequestId requestId)
          Replicates a remove method invocation over an EJB for a concrete objectId
 ResponseInfo restoreBeanChanges(RequestId requestId, java.lang.Object sfsw)
          Restores the state for a bean through its remote interface.
 

Method Detail

addModifiedBean

void addModifiedBean(RequestId reqId,
                     ObjectId bid,
                     byte[] state)
Correlates the changes made on a modified bean with a concrete client request

Parameters:
reqId - the request id from the client
bid - the unique identifier for the instance
state - the state of the modified bean

replicate

void replicate(RequestId reqId,
               java.lang.Object response)
               throws ReplicationException
Replicates the changes made on beans inside a concrete request context

Parameters:
reqId - the request id
response - the response to return to the client
Throws:
ReplicationException

replicateRemove

void replicateRemove(RequestId requestId)
                     throws ReplicationException
Replicates a remove method invocation over an EJB for a concrete objectId

Parameters:
requestId - identifies the requestId to remove in the backups
Throws:
ReplicationException

restoreBeanChanges

ResponseInfo restoreBeanChanges(RequestId requestId,
                                java.lang.Object sfsw)
Restores the state for a bean through its remote interface. This will probably made on a backup server when it has been selected to be the new primary.

Parameters:
requestId - the request id to access the state of the bean
sfsw - the sfsw that contains the instance where restore the state
Returns:
the last response held in HA service for that request, if exists

clear

void clear()
Clears/removes the elements used by the concrete implementation