コード例 #1
0
  public void startRandomLookup(ChordNode starter) {
    log.debug("lookup counter " + Arrays.toString(lookupCount));
    lookupCount[0]++;
    long randomLong = Simulator.getRandom().nextLong();
    String token = Long.toString(Math.abs(randomLong), 32);
    ChordID key = ChordIDFactory.getInstance().getChordID(token);
    int lookupID = starter.overlayNodeLookup(key, new MyCallback());

    log.debug("started lookup request key = " + key + " id = " + lookupID + " from = " + starter);
    lookupList.add(lookupID);
  }