Skip to content

Commit

Permalink
Use @Local for output stream in DataSink test ensemble
Browse files Browse the repository at this point in the history
  • Loading branch information
vladamatena committed May 20, 2015
1 parent bbd30e6 commit 0311d7d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ public class DataSink {

// Output for writing results
@Local
private static PrintStream out;
public PrintStream out;

public DataSink(String id, PrintStream out) {
this.id = id;
this.outValue = 0;
DataSink.out = out;
this.out = out;
}

/**
* Prints current value
*/
@Process
@PeriodicScheduling(period = 1000)
public static void dataReport(@In("id") String id, @In("outValue") Integer value) {
public static void dataReport(
@In("id") String id,
@In("outValue") Integer value,
@In("out") PrintStream out) {
out.println(id + ": " + value);
}
}

0 comments on commit 0311d7d

Please sign in to comment.