Package org.ardverk.dht.entity

Examples of org.ardverk.dht.entity.NodeEntity


    Contact[] contacts = outcome.getContacts();
   
    if (contacts.length == 0) {
      setException(new NoSuchNodeException(outcome));       
    } else {
      setValue(new NodeEntity(outcome));
    }
  }
View Full Code Here


      NodeConfig config = new NodeConfig();
      config.setLookupTimeout(20L, TimeUnit.SECONDS);
     
      DHTFuture<NodeEntity> future
        = first.discover(lookupId, config);
      NodeEntity entity = future.get();
      TestCase.assertEquals(lookupId, entity.getId());
     
      Contact[] contacts = entity.getContacts();
      Contact[] closest = entity.getClosest();
     
      // The Contacts in the response should be in the same order
      // as our DHT instances!
      int k = first.getRouteTable().getK();
      for (int i = 0; i < k && i < contacts.length; i++) {
View Full Code Here

TOP

Related Classes of org.ardverk.dht.entity.NodeEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.