public class JGReplicator extends java.lang.Object implements ReplicationManager, org.jgroups.blocks.RequestHandler
| Constructor and Description |
|---|
JGReplicator(javax.naming.Context ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModifiedBean(RequestId reqId,
ObjectId bid,
byte[] state)
Adds a modified EJB to the changes made inside a request.
|
void |
clear()
Closes and stops all the elements used (channel, dispatcher...)
|
java.lang.Object |
handle(org.jgroups.Message msg) |
void |
replicate(RequestId reqId,
java.lang.Object response)
Replicates the response and the EJB changes kept on the requestChanges
structure for a concrete reqId
|
void |
replicateRemove(RequestId requestId)
Replicates a remove method invocation over an EJB for a concrete
custerOID
|
ResponseInfo |
restoreBeanChanges(RequestId requestId,
java.lang.Object beanSwitch)
Applies the changes kept in BeanChanges.
|
public void addModifiedBean(RequestId reqId, ObjectId bid, byte[] state)
addModifiedBean in interface ReplicationManagerbid - the ObjectId of the changed beanstate - the serialized state of the changed beanreqId - the request id from the clientpublic void replicate(RequestId reqId, java.lang.Object response) throws ReplicationException
replicate in interface ReplicationManagerreqId - identifies the request changes to replicate hold in
requestChanges structureresponse - the response to return to the clientReplicationExceptionpublic void replicateRemove(RequestId requestId) throws ReplicationException
replicateRemove in interface ReplicationManagerrequestId - identifies the custerOID to remove in the backupsReplicationExceptionpublic ResponseInfo restoreBeanChanges(RequestId requestId, java.lang.Object beanSwitch)
restoreBeanChanges in interface ReplicationManagerrequestId - the request id to access the state of the beanbeanSwitch - the sfsw that contains the instance where restore the statepublic void clear()
clear in interface ReplicationManagerpublic java.lang.Object handle(org.jgroups.Message msg)
handle in interface org.jgroups.blocks.RequestHandler