提交 d43b4b61 编写于 作者: L liquidsnake@sapo.pt

Cleaned up a few comments. no changes in the code.

上级 8b25d2d1
......@@ -47,7 +47,7 @@ public abstract class SystemMessage implements Externalizable {
/**
* Returns the ID of the process which sent the message
* @return
* @return ID of the process that sent the message
*/
public final int getSender() {
return sender;
......
......@@ -25,9 +25,7 @@ import navigators.smart.tom.util.Logger;
*
* This class represents a Consensus Instance.
*
* @param <E> Type of the decided Object
*
* @author unkown
* @author Christian Spann <christian.spann at uni-ulm.de>
*/
public class Consensus {
......@@ -43,9 +41,7 @@ public class Consensus {
/**
* Creates a new instance of Consensus
* @param proposer The proposer role of PaW algorithm
* @param eid The execution ID for this consensus
* @param startTime The consensus start time
*/
public Consensus(int eid) {
this.eid = eid;
......
......@@ -55,7 +55,6 @@ public class Execution {
*
* @param manager Execution manager for this execution
* @param consensus Consensus instance to which this execution works for
* @param initialTimeout Initial timeout for rounds
*/
protected Execution(ExecutionManager manager, Consensus consensus) {
this.manager = manager;
......
......@@ -71,12 +71,10 @@ public final class ExecutionManager {
/**
* Creates a new instance of ExecutionManager
*
* @param manager Reconfiguration Manager
* @param acceptor Acceptor role of the PaW algorithm
* @param proposer Proposer role of the PaW algorithm
* @param acceptors Process ID's of all replicas, including this one
* @param f Maximum number of replicas that can be faulty
* @param me This process ID
* @param initialTimeout initial timeout for rounds
*/
public ExecutionManager(ReconfigurationManager manager, Acceptor acceptor,
Proposer proposer, int me) {
......
......@@ -56,9 +56,9 @@ public class Round implements Serializable {
/**
* Creates a new instance of Round for acceptors
* @param manager Reconfiguration Manager
* @param parent Execution to which this round belongs
* @param number Number of the round
* @param timeout Timeout duration for this round
*/
protected Round(ReconfigurationManager manager, Execution parent, int number) {
this.execution = parent;
......
......@@ -52,8 +52,8 @@ public final class Acceptor {
* Creates a new instance of Acceptor.
* @param communication Replicas communication system
* @param factory Message factory for PaW messages
* @param verifier Proof verifier
* @param conf TOM configuration
* @param lm Leader Module
* @param manager Reconfiguration Manager
*/
public Acceptor(ServerCommunicationSystem communication, MessageFactory factory,
LeaderModule lm, ReconfigurationManager manager) {
......
......@@ -37,8 +37,7 @@ public class Proposer {
*
* @param communication Replicas communication system
* @param factory Factory for PaW messages
* @param verifier Proof verifier
* @param conf TOM configuration
* @param manager Reconfiguration Manager
*/
public Proposer(ServerCommunicationSystem communication, MessageFactory factory,
ReconfigurationManager manager) {
......
......@@ -88,7 +88,7 @@ public class StateLog {
/**
* Sets the decision round for the last checkpoint
* @param lastCheckpointEid Decision round for the last checkpoint
* @param lastCheckpointRound Decision round for the last checkpoint
*/
public void setLastCheckpointRound(int lastCheckpointRound) {
......@@ -106,7 +106,7 @@ public class StateLog {
/**
* Sets the leader for the last checkpoint
* @param lastCheckpointEid Leader for the last checkpoint
* @param lastCheckpointLeader Leader for the last checkpoint
*/
public void setLastCheckpointLeader(int lastCheckpointLeader) {
......@@ -161,7 +161,6 @@ public class StateLog {
* in the same order in which they are delivered to the application. Only
* the 'k' batches received after the last checkpoint are supposed to be kept
* @param batch The batch of messages to be kept.
* @return True if the batch was added to the log, false otherwise
*/
public void addMessageBatch(byte[] batch, int round, int leader) {
......
......@@ -43,7 +43,6 @@ public class TransferableState implements Serializable {
* Constructs a TansferableState
* This constructor should be used when there is a valid state to construct the object with
* @param messageBatches Batches received since the last checkpoint.
* @param nextEid Execution ID for the last checkpoint
* @param state State associated with the last checkpoint
* @param stateHash Hash of the state associated with the last checkpoint
*/
......
......@@ -32,7 +32,7 @@ public class ReplicaContext {
* send a message to one or more clients.
*
* @param targets the target receivers of the message
* @param sm the message to be sent
* @param msg the message to be sent
*/
public void sendMessage(int[] targets, TOMMessage msg) {
cs.send(targets, msg);
......
......@@ -55,7 +55,6 @@ public class ServiceProxy extends TOMSender {
/**
* Constructor
*
* @see bellow
*/
public ServiceProxy(int processId) {
this(processId, null, null, null);
......@@ -64,7 +63,6 @@ public class ServiceProxy extends TOMSender {
/**
* Constructor
*
* @see bellow
*/
public ServiceProxy(int processId, String configHome) {
this(processId, configHome, null, null);
......@@ -73,7 +71,7 @@ public class ServiceProxy extends TOMSender {
/**
* Constructor
*
* @param id Process id for this client (should be different from replicas)
* @param processId Process id for this client (should be different from replicas)
* @param configHome Configuration directory for BFT-SMART
* @param replyComparator used for comparing replies from different servers
* to extract one returned by f+1
......
......@@ -98,7 +98,7 @@ public abstract class ServiceReplica extends TOMReceiver implements Runnable {
/**
* Constructor
* @param id Replica ID
* @param isToJoin: if true, the replica tries to join the system, otherwise it waits for TTP message
* @param isToJoin if true, the replica tries to join the system, otherwise it waits for TTP message
* informing its join
*/
public ServiceReplica(int id, boolean isToJoin) {
......@@ -343,7 +343,7 @@ public abstract class ServiceReplica extends TOMReceiver implements Runnable {
* therefore, ensure the determinism required in a replicated state machine.
*
* @param command the command issue by the client
* @param MessageContext msgCtx information related with the command
* @param msgCtx information related with the command
*
* @return the reply for the request issued by the client
*/
......@@ -357,7 +357,7 @@ public abstract class ServiceReplica extends TOMReceiver implements Runnable {
* sender.
*
* @param command the command issue by the client
* @param MessageContext msgCtx information related with the command
* @param msgCtx information related with the command
*
* @return the reply for the request issued by the client
*/
......
......@@ -46,7 +46,7 @@ public abstract class TOMReceiver implements TOMRequestReceiver {
* This method initializes the object
*
* @param cs Server side communication System
* @param conf Total order messaging configuration
* @param reconfManager Reconfiguration Manager
*/
public void init(ServerCommunicationSystem cs, ReconfigurationManager reconfManager,
int lastExec, int lastLeader) {
......
......@@ -80,8 +80,7 @@ public abstract class TOMSender implements ReplyReceiver {
* This method initializes the object
* TODO: Perguntar se este metodo n pode antes ser protected (compila como protected, mas mesmo assim...)
*
* @param cs Client side comunication system
* @param conf Client side comunication system configuration
* @param processId ID of the process
* @param sequence Initial sequence number for data multicast
*
*
......@@ -102,8 +101,7 @@ public abstract class TOMSender implements ReplyReceiver {
* This method initializes the object
* TODO: Perguntar se este metodo n pode antes ser protected (compila como protected, mas mesmo assim...)
*
* @param cs Client side comunication system
* @param conf Total order messaging configuration
* @param processId ID of the process
*/
public void init(int processId) {
this.viewManager = new ViewManager(processId);
......@@ -151,7 +149,7 @@ public abstract class TOMSender implements ReplyReceiver {
/**
* Multicast a TOMMessage to the group of replicas
*
* @param m Data to be multicast
* @param sm Message to be multicast
*/
public void TOMulticast(TOMMessage sm) {
cs.send(useSignatures, this.viewManager.getCurrentViewProcesses(), sm);
......
......@@ -48,7 +48,7 @@ public final class DeliveryThread extends Thread {
* Creates a new instance of DeliveryThread
* @param tomLayer TOM layer
* @param receiver Object that receives requests from clients
* @param conf TOM configuration
* @param manager Reconfiguration Manager
*/
public DeliveryThread(TOMLayer tomLayer, TOMRequestReceiver receiver, ReconfigurationManager manager) {
super("Delivery Thread");
......
......@@ -119,7 +119,7 @@ public final class TOMLayer extends Thread implements RequestReceiver {
* @param lm Leader module
* @param a Acceptor role of the PaW algorithm
* @param cs Communication system between replicas
* @param conf TOM configuration
* @param recManager Reconfiguration Manager
*/
public TOMLayer(ExecutionManager manager,
TOMRequestReceiver receiver,
......@@ -174,7 +174,7 @@ public final class TOMLayer extends Thread implements RequestReceiver {
/**
* Computes an hash for a TOM message
* @param message
* @param data Data from which to generate the hash
* @return Hash for the specified TOM message
*/
public final byte[] computeHash(byte[] data) {
......@@ -401,9 +401,8 @@ public final class TOMLayer extends Thread implements RequestReceiver {
*
* TODO: verify timestamps and nonces
*
* @param round the Round for which this value is being proposed
* @param proposedValue the value being proposed
* @return
* @return Valid messages contained in the proposed value
*/
public TOMMessage[] checkProposedValue(byte[] proposedValue) {
Logger.println("(TOMLayer.isProposedValueValid) starting");
......
......@@ -125,7 +125,6 @@ public class TOMMessage extends SystemMessage implements Externalizable, Compara
/**
* Retrieves the debug info from the TOM layer
* @return The debug info from the TOM layer
*/
public void setDebugInfo(DebugInfo info) {
this.info = info;
......
......@@ -98,9 +98,9 @@ public final class RandomServer extends ServiceReplica {
/**
* Just return the current value of the counter.
*
* @param command
* @param msgCtx
* @return
* @param command Command to b executed
* @param msgCtx Context of the message received
* @return Reply t obe sent to the client
*/
@Override
public byte[] executeUnordered(byte[] command, MessageContext msgCtx) {
......
......@@ -54,7 +54,6 @@ public class CollectData implements Externalizable {
* @param eid id da execucao
* @param quorumWeaks ultimo valor recebido de um quorum bizantino de WEAKS
* @param writeSet valores escritos pela replica
* @param signature assinatura da replica
*/
public CollectData(int pid, int eid, RoundValuePair quorumWeaks, HashSet<RoundValuePair> writeSet) {
......
......@@ -258,7 +258,7 @@ public class LCManager {
/**
* Defines the set of last eids related to a timestamp
* @param ts timestamp for the last eid info
* @param colls a set of last eid data
* @param lasts a set of last eid data
*/
public void setLastEids(int ts, HashSet<LastEidData> lasts) {
......@@ -268,7 +268,7 @@ public class LCManager {
/**
* Keep collect from an incoming SYNC message
* @param ts the current timestamp
* @param collect the collect data
* @param signedCollect the signed collect data
*/
public void addCollect(int ts, SignedObject signedCollect) {
......@@ -391,19 +391,14 @@ public class LCManager {
*/
public boolean binds(int round, byte[] value, HashSet<CollectData> collects) {
/*System.out.println(value != null);
System.out.println(collects != null);
System.out.println(collects.size() > reconfManager.getCurrentViewN() - reconfManager.getCurrentViewF());
System.out.println(quorumHighest(round, value, collects));
System.out.println(certifiedValue(round, value, collects));*/
return (value != null && collects != null && collects.size() > (reconfManager.getCurrentViewN() - reconfManager.getCurrentViewF()))
&& quorumHighest(round, value, collects) && certifiedValue(round, value, collects);
}
/**
* Devolve um valor que seja bind, que seja diferente de nulo e com round maior ou igual a zero
* @param collects
* @return
* @param collects Conjunto de collects de onde determinar o valor
* @return O valor bind
*/
public byte[] getBindValue(HashSet<CollectData> collects) {
......@@ -588,7 +583,7 @@ public class LCManager {
/**
* Fetchs a set of correctly signed and normalized collect data structures from the
* specified original set of collects
* @param collects original set of collects
* @param signedObjects original set of signed collects
* @param eid the eid to which to normalize the collects
* @return a set of correctly signed and normalized collect data structures
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册