Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

imports and format

git-svn-id: http://north.dsg.cs.tcd.ie/repos/simulator-workflow@57 6aedb14f-efc7-4c1d-8d98-6d0cd5b8577c
  • Loading branch information...
commit 9c8eb191c39c502a48ab22324a48a959cb25676a 1 parent fcb21bd
@jalliot authored
View
3  ducks/src/ducks/driver/CiANInitiatorNode.java
@@ -41,7 +41,8 @@ protected void addApplication(Mapper protMap, Field field, Placement place) thro
e.printStackTrace();
}
- AppCiANBase ac = new AppCiANInitiator(this.id, compoStats, reqSize, reqRate, wTS, wTE, duration, compRestrict);
+ AppCiANBase ac = new AppCiANInitiator(this.id, compoStats, reqSize, reqRate, wTS, wTE, duration,
+ compRestrict);
// Currently we do not use transport layer instead we hand
// over from the network layer directly to application layer
View
2  js-ext/src/ext/jist/swans/app/AppCiANBase.java
@@ -4,8 +4,6 @@
import java.util.Iterator;
import java.util.List;
-import com.sun.java_cup.internal.lalr_item;
-
import jist.runtime.JistAPI;
import jist.swans.Constants;
import jist.swans.app.AppInterface;
View
13 js-ext/src/ext/jist/swans/app/AppCiANInitiator.java
@@ -143,7 +143,8 @@ protected void handleToken(CiANToken t, NetAddress src) {
compositionStats.setiKnowsLastServiceExecuted(CiANWorkflow.STRING_DESTINATION);
} else { // should not happen
compositionStats.setiKnowsLastServiceExecuted(String.valueOf((char) (service - 1)));
- compositionStats.registerForwardToExecEndTime(String.valueOf(service), wf.getId(), JistAPI.getTime());
+ compositionStats.registerForwardToExecEndTime(String.valueOf(service), wf.getId(),
+ JistAPI.getTime());
}
break;
default:
@@ -197,7 +198,9 @@ private CiANWorkflow createWorkflow() {
msgId++;
compositionStats.setLastService(Character.toString(wf.getLastRealService()));
for (char service : wf.getServices()) {
- compositionStats.registerBindStartTime(wf.isLastService(service) ? CiANWorkflow.STRING_DESTINATION : String.valueOf(service), wf.getId(), JistAPI.getTime());
+ compositionStats.registerBindStartTime(
+ wf.isLastService(service) ? CiANWorkflow.STRING_DESTINATION : String.valueOf(service), wf.getId(),
+ JistAPI.getTime());
}
return wf;
@@ -225,12 +228,14 @@ private void handOff(CiANWorkflow wf) {
// Disbursement
CiANWorkflowRequest wfReq = new CiANWorkflowRequest(wf.getId(), wf.getServices(), wf.getInputs(), providers);
- compositionStats.registerForwardToExecStartTime(String.valueOf(wf.getServiceForIndex(0)), wf.getId(), JistAPI.getTime());
+ compositionStats.registerForwardToExecStartTime(String.valueOf(wf.getServiceForIndex(0)), wf.getId(),
+ JistAPI.getTime());
for (int i = 0; i < providers.length - 1; ++i) {
CiANProvider provider = providers[i];
char service = wf.getServiceForIndex(i);
- compositionStats.registerBindEndTime(String.valueOf(wf.getServiceForIndex(i)), wf.getId(), JistAPI.getTime());
+ compositionStats.registerBindEndTime(String.valueOf(wf.getServiceForIndex(i)), wf.getId(),
+ JistAPI.getTime());
compositionStats.addServiceProvider(wf.getId(), "" + provider.getNodeId());
compositionStats.setLastServiceBound(String.valueOf(service));
compositionStats.setiKnowsLastServiceBound(String.valueOf(service));
View
3  js-ext/src/ext/jist/swans/app/AppCiANProvider.java
@@ -9,7 +9,6 @@
import jist.swans.mac.MacAddress;
import jist.swans.misc.Message;
import jist.swans.net.NetAddress;
-import ducks.driver.SimParams;
import ext.util.stats.DucksCompositionStats;
public class AppCiANProvider extends AppCiANBase
@@ -149,7 +148,7 @@ private void execute(CiANWorkflow wf, int index) {
compositionStats.setLastServiceExecuted(String.valueOf(service));
char nextService = wf.getSuccessorService(service);
wf.updateInputFor(nextService, in);
-
+
// TODO handoff to every successors and not rely on (index + 1) anymore
handOff(wfId, nextService, in, wf.getProvidersFor(index + 1).get(0), wf.isLastService(nextService));

0 comments on commit 9c8eb19

Please sign in to comment.
Something went wrong with that request. Please try again.