コード例 #1
0
ファイル: EDMongering.java プロジェクト: naser-ayat/bol1
 ProtocolData(String prefix) {
   pid = CommonState.getPid();
   lid = Configuration.getPid(prefix + "." + PAR_LINKABLE);
   tid = Configuration.getPid(prefix + "." + PAR_TRANSPORT);
   period = Configuration.getInt(prefix + "." + PAR_PERIOD);
   prob = Configuration.getDouble(prefix + "." + PAR_PROB);
 }
コード例 #2
0
ファイル: HelloWorld.java プロジェクト: JEC2000/Projet_ARA
 public HelloWorld(String prefix) {
   this.prefix = prefix;
   // initialisation des identifiants a partir du fichier de configuration
   this.transportPid = Configuration.getPid(prefix + ".transport");
   this.mypid = Configuration.getPid(prefix + ".myself");
   this.ping_timeout = Configuration.getLong(prefix + ".ping_timeout");
   this.ping_frequency = Configuration.getLong(prefix + ".ping_frequency");
   this.transport = null;
   this.state = 0;
   this.last_pong = new long[Network.size()];
   this.nodes_alive = new boolean[Network.size()];
   for (int i = 0; i < Network.size(); i++) {
     nodes_alive[i] = true;
   }
 }