Package net.tomp2p.dht

Examples of net.tomp2p.dht.PeerDHT.peerBean()


                    System.err.println("future created "+ future);
                }
            }, true);
            master = peers[0];
            Number160 locationKey = new Number160(RND2);
            master.peerBean().peerMap();
            // closest
            TreeSet<PeerAddress> tmp = new TreeSet<PeerAddress>(PeerMap.createComparator(locationKey));
            tmp.add(master.peerAddress());
            for (int i = 0; i < peers.length; i++) {
                tmp.add(peers[i].peerAddress());
View Full Code Here


      Assert.assertEquals(joins[0][2], replicateOther.get());
      replicateOther.set(0);
     
      for (int i = 1; i < joins.length; i++) {
        // insert a peer
        master.peerBean().peerMap().peerFound(peers.get(i).peerAddress(), null, null);
        // verify replication notifications
        Assert.assertEquals(joins[i][0], replicateI.get());
        replicateI.set(0);
        Assert.assertEquals(joins[i][1], replicateWe.get());
        replicateWe.set(0);
View Full Code Here

        replicateOther.set(0);
      }
     
      for (int i = 0; i < leaves.length; i++) {
        // remove a peer
        master.peerBean().peerMap().peerFailed(peers.get(i+1).peerAddress(), new PeerException(AbortCause.SHUTDOWN, "shutdown"));
        // verify replication notifications
        Assert.assertEquals(leaves[i][0], replicateI.get());
        replicateI.set(0);
        Assert.assertEquals(leaves[i][1], replicateWe.get());
        replicateWe.set(0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.