Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add/update copyright notices.
[simgrid.git] / examples / java / kademlia / Common.java
1 /* Copyright (c) 2012-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 package kademlia;
8 /**
9  * Common constants used all over the simulation
10  */
11 public class Common {
12         public final static int COMM_SIZE = 1;
13         public final static int COMP_SIZE = 0;
14         
15         public final static int RANDOM_LOOKUP_INTERVAL = 100;
16         
17         public final static int alpha = 3;
18         /**
19          * Size of the nodes identifier
20          */
21         public final static int IDENTIFIER_SIZE = 32;
22         /**
23          * Maximum size of the buckets
24          */
25         public final static int BUCKET_SIZE = 20;
26         /**
27          * Maximum number of trial for the "JOIN" request
28          */
29         public final static int MAX_JOIN_TRIALS = 4;
30         /**
31          * Timeout for a "FIND_NODE" request to a node
32          */
33         public final static int FIND_NODE_TIMEOUT = 10;
34         /**
35          * Global timeout for a FIND_NODE.
36          */
37         public final static int FIND_NODE_GLOBAL_TIMEOUT = 50;
38         /**
39          * Timeout for a "PING" request
40          */
41         public final static int PING_TIMEOUT = 35;
42         
43         public final static int MAX_STEPS = 10;
44
45         public final static int JOIN_BUCKETS_QUERIES = 1;
46 }