org.ow2.carol.cmi.ha
Interface ReplicationManager

All Known Implementing Classes:
ReplicationManagerImpl

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 addEntityBean(RequestId reqId, EntityBeanReference bean)
          Correlates the changes made on a modified bean with a concrete client request.
 void addModifiedBean(RequestId reqId, org.ow2.carol.cmi.ha.SessionId bid, StatefulBeanReference bean)
          Correlates the changes made on a modified bean with a concrete client request.
 void addResponse(RequestId reqId, java.lang.Object response)
          Associate a response with a requestId.
 void clear()
          Clears/removes the elements used by the concrete implementation.
 java.lang.Object getBackupResponse(RequestId reqId)
          Returns the response associated with the request id.
 boolean hasBackupResponse(RequestId reqId)
          Returns true if the request id have an associated response, false in other case.
 void processMessage(HaMessageData data)
          Processes a message data.
 void replicate(RequestId reqId)
          Replicates the changes made on beans inside a concrete request context.
 void replicateCommit(RequestId reqId, boolean committed)
          Replicates the commit/abort message associate with a request.
 void restoreBeanChanges(org.ow2.carol.cmi.ha.SessionId clusterOID, StatefulBeanReference bean)
          Restores the state for a bean through its remote interface.
 

Method Detail

addModifiedBean

void addModifiedBean(RequestId reqId,
                     org.ow2.carol.cmi.ha.SessionId bid,
                     StatefulBeanReference bean)
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
bean - the bean reference

addEntityBean

void addEntityBean(RequestId reqId,
                   EntityBeanReference bean)
Correlates the changes made on a modified bean with a concrete client request.

Parameters:
reqId - the request id from the client
bean - the bean reference

addResponse

void addResponse(RequestId reqId,
                 java.lang.Object response)
Associate a response with a requestId.

Parameters:
reqId - the request id
response - the response

replicate

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

Parameters:
reqId - the request id
Throws:
ReplicationException

replicateCommit

void replicateCommit(RequestId reqId,
                     boolean committed)
                     throws ReplicationException
Replicates the commit/abort message associate with a request.

Parameters:
reqId - the request id
committed - true if the transaction has committed
Throws:
ReplicationException

hasBackupResponse

boolean hasBackupResponse(RequestId reqId)
Returns true if the request id have an associated response, false in other case.

Parameters:
reqId - the request id
Returns:
true if the request id have an associated response, false in other case

getBackupResponse

java.lang.Object getBackupResponse(RequestId reqId)
Returns the response associated with the request id. Returns null if there is not response associated

Parameters:
reqId -
Returns:
the associated response

restoreBeanChanges

void restoreBeanChanges(org.ow2.carol.cmi.ha.SessionId clusterOID,
                        StatefulBeanReference bean)
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:
clusterOID - the cluster object id
bean - the sfsw that contains the instance where restore the state

processMessage

void processMessage(HaMessageData data)
Processes a message data.

Parameters:
data - the message data

clear

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



Copyright © 2007 OW2 Consortium. All Rights Reserved.