Package com.spidercache.dht

Examples of com.spidercache.dht.DHT


   * Logic for bootstrapping:
   *
   */
  private void nodeStart(){
   
    D = new DHT("SpiderCache DHT", DHTPort, MessagePort, null, 0);
    DS = new DiscoveryService(D, DHTPort);
    NA = new NodeAnnouncer(DS);
    cachepath = "/home/snark/cache";
   
  }
View Full Code Here


public class AddGetTest {

  @Test
  public void testAddGet() {
    TestObject test = new TestObject("Testing!");
    DHT node1 = new DHT("Node 5001", 5001, 5101, "127.0.0.1", 5001);
    DHT node2 = new DHT("Node 5002", 5002, 5102, "127.0.0.1", 5001);
    node1.put("test", test);
      try {
        assertEquals(test, (TestObject) node2.get("test"));
      } catch (RoutingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      } catch (IOException e) {
        // TODO Auto-generated catch block
View Full Code Here

TOP

Related Classes of com.spidercache.dht.DHT

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.