1 /* Copyright (c) 2006-2014, 2016. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
8 import java.util.ArrayList;
10 import org.simgrid.msg.Task;
12 /* Task exchanged between the tracker and the peers. */
13 public class TrackerTask extends Task {
20 public String hostname;
21 public String mailbox;
24 public int downloaded;
26 public double interval;
27 public ArrayList<Integer> peers;
29 public TrackerTask(String hostname, String mailbox, int peerId) {
30 this(hostname, mailbox, peerId, 0, 0, Common.FILE_SIZE);
33 public TrackerTask(String hostname, String mailbox, int peerId, int uploaded, int downloaded, int left) {
34 super("", 0, Common.TRACKER_COMM_SIZE);
35 this.type = Type.REQUEST;
36 this.hostname = hostname;
37 this.mailbox = mailbox;
39 this.uploaded = uploaded;
40 this.downloaded = downloaded;
42 this.peers = new ArrayList<Integer>();