Examples of rawData()


Examples of net.tomp2p.dht.FutureGet.rawData()

       
        // we got attack!
        FutureGet futureGet = peers[0].get(key1).all().requestP2PConfiguration(REQUEST_3).start();
        futureGet.awaitUninterruptibly();
        System.out.println("peer[0] got " + futureGet.data().object());
        for (Entry<PeerAddress, Map<Number640, Data>> entry : futureGet.rawData().entrySet()) {
            System.out.print("got from (3)" + entry.getKey());
            System.out.println(entry.getValue());
        }
        // increase the replicas we fetch
        FutureGet futureGet1 = peers[0].get(key1).all().requestP2PConfiguration(REQUEST_6).start();
View Full Code Here

Examples of net.tomp2p.dht.FutureGet.rawData()

        // countermeasure - statistics, pick not closest, but random peer that has the data - freshness vs. load
        // also, check distances!
        Statistics statistics = new Statistics(peers[0].peerBean().peerMap());
        System.out.println("average distance: "+statistics.avgGap());
        for (Entry<PeerAddress, Map<Number640, Data>> entry : futureGet1.rawData().entrySet()) {
            System.out.print("got from (6)" + entry.getKey());
            System.out.print(" distance: "+key1.xor(entry.getKey().peerId()).doubleValue());
            System.out.println(" "+entry.getValue());
        }
    }
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.