public class ServiceReplica
extends java.lang.Object
Constructor and Description |
---|
ServiceReplica(int id,
boolean isToJoin,
Executable executor,
Recoverable recoverer)
Constructor
|
ServiceReplica(int id,
Executable executor,
Recoverable recoverer)
Constructor
|
ServiceReplica(int id,
java.lang.String configHome,
boolean isToJoin,
Executable executor,
Recoverable recoverer) |
ServiceReplica(int id,
java.lang.String configHome,
Executable executor,
Recoverable recoverer)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ReplicaContext |
getReplicaContext()
Obtains the current replica context (getting access to several information
and capabilities of the replication engine).
|
void |
joinMsgReceived(VMMessage msg) |
void |
leave()
This method makes the replica leave the group
|
void |
receiveMessages(int[] consId,
int regency,
TOMMessage[][] requests) |
void |
receiveReadonlyMessage(TOMMessage message,
MessageContext msgCtx)
This message delivers a readonly message, i.e., a message that was not
ordered to the replica and gather the reply to forward to the client
|
void |
setReplyController(Replier replier) |
public ServiceReplica(int id, Executable executor, Recoverable recoverer)
id
- Replica IDpublic ServiceReplica(int id, java.lang.String configHome, Executable executor, Recoverable recoverer)
id
- Process IDconfigHome
- Configuration directory for JBPpublic ServiceReplica(int id, boolean isToJoin, Executable executor, Recoverable recoverer)
id
- Replica IDisToJoin:
- if true, the replica tries to join the system, otherwise it waits for TTP message
informing its joinpublic ServiceReplica(int id, java.lang.String configHome, boolean isToJoin, Executable executor, Recoverable recoverer)
public void setReplyController(Replier replier)
public void joinMsgReceived(VMMessage msg)
public final void receiveReadonlyMessage(TOMMessage message, MessageContext msgCtx)
message
- the request received from the delivery threadpublic void receiveMessages(int[] consId, int regency, TOMMessage[][] requests)
public void leave()
public final ReplicaContext getReplicaContext()