|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.carol.cmi.ha.ReplicationManagerImpl
public class ReplicationManagerImpl
This class implements the main replication functionality.
| Constructor Summary | |
|---|---|
ReplicationManagerImpl(int timeout,
java.lang.String datasource,
java.lang.String jgroupsConf,
java.lang.String jgroupsGroupname)
|
|
| 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 clusterOId,
StatefulBeanReference bean)
Adds a modified EJB to the changes made inside a request. |
void |
addResponse(RequestId reqId,
java.lang.Object response)
Associate a response with a requestId. |
void |
clear()
Closes and stops all the elements used (channel, dispatcher...). |
double |
getavgSizeofReplicatedMessages()
Get the average size of the replicated messages sent. |
java.lang.Object |
getBackupResponse(RequestId reqId)
Returns the response associated with the request id. |
java.lang.String |
getdatasourceName()
Get the Datasource name required to hold the EB version numbers of the horizontal replication approach. |
long |
getinfoTimeout()
Get the SFSB info timeout to clean certain information stored in memory. |
java.lang.String |
getjgroupsConfFileName()
Get the JGroups configuration file name. |
java.lang.String |
getName()
|
long |
getnumberofReplicatedMessages()
Get the number of replicated messages sent. |
java.lang.String |
getobjectName()
|
double |
gettotSizeofReplicatedMessages()
Get the total size of the replicated messages sent. |
boolean |
hasBackupResponse(RequestId requestId)
Returns true if the request id has an associated response, false in other case. |
void |
processMessage(HaMessageData data)
Processes a message data. |
void |
replicate(RequestId requestId)
Replicates the EJB changes kept on the requestChanges structure for a concrete reqId. |
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)
Applies the changes kept in BeanChanges. |
void |
setdatasourceName(java.lang.String name)
Set the Datasource name required to hold the EB version numbers of the horizontal replication approach. |
void |
setinfoTimeout(long timeout)
Set the SFSB info timeout. |
void |
setobjectName(javax.management.ObjectName name)
Sets the object name of this MBean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReplicationManagerImpl(int timeout,
java.lang.String datasource,
java.lang.String jgroupsConf,
java.lang.String jgroupsGroupname)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void addModifiedBean(RequestId reqId,
org.ow2.carol.cmi.ha.SessionId clusterOId,
StatefulBeanReference bean)
addModifiedBean in interface ReplicationManagerreqId - the request id from the clientclusterOId - the ObjectId of the changed beanbean - the serialized state of the changed bean
public void addEntityBean(RequestId reqId,
EntityBeanReference bean)
addEntityBean in interface ReplicationManagerreqId - the request id from the clientbean - the bean reference
public void addResponse(RequestId reqId,
java.lang.Object response)
addResponse in interface ReplicationManagerreqId - the request idresponse - the response
public void replicate(RequestId requestId)
throws ReplicationException
replicate in interface ReplicationManagerrequestId - identifies the request changes to replicate hold in requestChanges structure
ReplicationException
public void replicateCommit(RequestId reqId,
boolean committed)
throws ReplicationException
ReplicationManager
replicateCommit in interface ReplicationManagerreqId - the request idcommitted - true if the transaction has committed
ReplicationExceptionpublic boolean hasBackupResponse(RequestId requestId)
hasBackupResponse in interface ReplicationManagerrequestId - the request id
public java.lang.Object getBackupResponse(RequestId reqId)
getBackupResponse in interface ReplicationManagerreqId -
public void restoreBeanChanges(org.ow2.carol.cmi.ha.SessionId clusterOID,
StatefulBeanReference bean)
restoreBeanChanges in interface ReplicationManagerclusterOID - bean - public void processMessage(HaMessageData data)
processMessage in interface ReplicationManagerdata - the message datapublic void clear()
clear in interface ReplicationManagerpublic java.lang.String getName()
getName in interface ReplicationManagerImplMBeanpublic java.lang.String getobjectName()
getobjectName in interface ReplicationManagerImplMBeanpublic void setobjectName(javax.management.ObjectName name)
name - the Object Namepublic long getnumberofReplicatedMessages()
getnumberofReplicatedMessages in interface ReplicationManagerImplMBeanpublic double getavgSizeofReplicatedMessages()
getavgSizeofReplicatedMessages in interface ReplicationManagerImplMBeanpublic double gettotSizeofReplicatedMessages()
gettotSizeofReplicatedMessages in interface ReplicationManagerImplMBeanpublic java.lang.String getjgroupsConfFileName()
getjgroupsConfFileName in interface ReplicationManagerImplMBeanpublic long getinfoTimeout()
getinfoTimeout in interface ReplicationManagerImplMBeanpublic void setinfoTimeout(long timeout)
setinfoTimeout in interface ReplicationManagerImplMBeantimeout - the timeout to clean the infopublic java.lang.String getdatasourceName()
getdatasourceName in interface ReplicationManagerImplMBeanpublic void setdatasourceName(java.lang.String name)
setdatasourceName in interface ReplicationManagerImplMBeanname - the name of the datasource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||