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,
Executable executor,
Recoverable recoverer,
RequestVerifier verifier)
Constructor
|
ServiceReplica(int id,
java.lang.String configHome,
boolean isToJoin,
Executable executor,
Recoverable recoverer,
RequestVerifier verifier) |
ServiceReplica(int id,
java.lang.String configHome,
Executable executor,
Recoverable recoverer,
RequestVerifier verifier)
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(bftsmart.reconfiguration.VMMessage msg) |
void |
leave()
This method makes the replica leave the group
|
void |
receiveMessages(int[] consId,
int[] regencies,
int[] leaders,
bftsmart.tom.leaderchange.CertifiedDecision[] cDecs,
bftsmart.tom.core.messages.TOMMessage[][] requests) |
void |
receiveReadonlyMessage(bftsmart.tom.core.messages.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 IDexecutor
- Executorrecoverer
- Recovererpublic ServiceReplica(int id, Executable executor, Recoverable recoverer, RequestVerifier verifier)
id
- Replica IDexecutor
- Executorrecoverer
- Recovererverifier
- Requests verifierpublic ServiceReplica(int id, java.lang.String configHome, Executable executor, Recoverable recoverer, RequestVerifier verifier)
id
- Process IDconfigHome
- Configuration directory for JBPexecutor
- Executorrecoverer
- Recovererverifier
- Requests verifierpublic 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 joinexecutor
- Executorrecoverer
- Recovererpublic ServiceReplica(int id, java.lang.String configHome, boolean isToJoin, Executable executor, Recoverable recoverer, RequestVerifier verifier)
public void setReplyController(Replier replier)
public void joinMsgReceived(bftsmart.reconfiguration.VMMessage msg)
public final void receiveReadonlyMessage(bftsmart.tom.core.messages.TOMMessage message, MessageContext msgCtx)
message
- the request received from the delivery threadpublic void receiveMessages(int[] consId, int[] regencies, int[] leaders, bftsmart.tom.leaderchange.CertifiedDecision[] cDecs, bftsmart.tom.core.messages.TOMMessage[][] requests)
public void leave()
public final ReplicaContext getReplicaContext()