Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dig through git history, and update copyright lines.
[simgrid.git] / examples / java / bittorrent / Common.java
1 /*
2  * Copyright (c) 2006-2013. The SimGrid Team.
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. 
7  */
8 package bittorrent;
9 /**
10  * Common constants for use in the simulation
11  */
12 public class Common {   
13                 
14         public static String TRACKER_MAILBOX = "tracker_mailbox";
15         
16         public static int FILE_SIZE = 5120;
17         public static int FILE_PIECE_SIZE = 512;
18         public static int FILE_PIECES = 10;
19         public static int PIECES_BLOCKS = 5;
20         
21         public static int BLOCKS_REQUESTED = 2;
22         
23         public static int PIECE_COMM_SIZE = 1;
24         /**
25          * Information message size
26          */
27         public static int MESSAGE_SIZE = 1;
28         /**
29          * Max number of pairs sent by the tracker to clients
30          */
31         public static int MAXIMUM_PEERS = 50;
32         /**
33          * Interval of time where the peer should send a request to the tracker
34          */
35         public static int TRACKER_QUERY_INTERVAL = 1000;
36         /**
37          * Communication size for a task to the tracker
38          */
39         public static double TRACKER_COMM_SIZE = 0.01;
40         /**
41          * Timeout for the get peers data
42          */
43         public static int GET_PEERS_TIMEOUT = 10000;
44         /**
45          * Timeout for "standard" messages.
46          */
47         public static int TIMEOUT_MESSAGE = 10;
48         /**
49          * Timeout for tracker receive.
50          */
51         public static int TRACKER_RECEIVE_TIMEOUT = 10;
52         /**
53          * Number of peers that can be unchocked at a given time
54          */
55         public static int MAX_UNCHOKED_PEERS = 4;
56         /**
57          * Interval between each update of the choked peers
58          */
59         public static int UPDATE_CHOKED_INTERVAL = 30;
60         /**
61          * Number of pieces the peer asks for simultaneously
62          */
63         public static int MAX_PIECES = 1;
64 }