} else {
Task task = comm.getTask();
if (task instanceof FindNodeAnswerTask) {
- answerGot = true;
//Retrieve the node list and ping them
FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task;
Answer answer = answerTask.getAnswer();
answerGot = true;
- //answersGotten++;
if (answer.getDestinationId() == this.id) {
//Ping everyone in the list
for (Contact c : answer.getNodes()) {
public boolean findNode(int destination, boolean counts) {
int queries;
int answers;
- int nodesAdded = 0;
- boolean destinationFound = false;
+ int nodesAdded;
+ boolean destinationFound;
int steps = 0;
double timeBeginReceive;
double timeout;
}
public void main(String[] args) throws MsgException {
- String mount = "";
+ String mount;
String filename;
switch (number) {
case 0:
}
public void main(String[] args) throws MsgException {
- double computationAmount = 1.0;
- double priority = 1.0;
-
- computationAmount = Double.parseDouble(args[0]);
- priority = Double.parseDouble(args[1]);
+ double computationAmount = Double.parseDouble(args[0]);
+ double priority = Double.parseDouble(args[1]);
Msg.info("Hello! Running a task of size " + computationAmount + " with priority " + priority);
ping.send(mailboxes[pos]);
Trace.hostPushState (getHost().getName(), PM_STATE, "waitingPong");
- PingPongTask pong = (PingPongTask)Task.receive(getHost().getName());
+ Task.receive(getHost().getName());
double timeGot = Msg.getClock();
double timeSent = ping.getTime();
double communicationTime;