1 /* Copyright (c) 2006-2014, 2016-2017. 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. */
7 package app.bittorrent;
9 /* Common constants for use in the simulation */
11 public static final String TRACKER_MAILBOX = "tracker_mailbox";
12 public static final int FILE_SIZE = 5120;
13 public static final int FILE_PIECE_SIZE = 512;
14 public static final int FILE_PIECES = 10;
15 public static final int PIECES_BLOCKS = 5;
16 public static final int BLOCKS_REQUESTED = 2;
17 public static final int PIECE_COMM_SIZE = 1;
18 public static final int MESSAGE_SIZE = 1; /* Information message size */
19 public static final int MAXIMUM_PEERS = 50; /* Max number of peers sent by the tracker to clients */
20 public static final int TRACKER_QUERY_INTERVAL = 1000; /* Interval of time where the peer should send a request to the tracker */
21 public static final double TRACKER_COMM_SIZE = 1; /* Communication size for a task to the tracker */
22 public static final int GET_PEERS_TIMEOUT = 10000; /* Timeout for the get peers data */
23 public static final int TIMEOUT_MESSAGE = 10;
24 public static final int TRACKER_RECEIVE_TIMEOUT = 10;
25 public static final int MAX_UNCHOKED_PEERS = 4; /* Number of peers that can be unchocked at a given time */
26 public static final int UPDATE_CHOKED_INTERVAL = 30; /* Interval between each update of the choked peers */
27 public static final int MAX_PIECES = 1; /* Number of pieces the peer asks for simultaneously */
29 throw new IllegalAccessError("Utility class");