Package net.tomp2p.p2p.builder

Examples of net.tomp2p.p2p.builder.RoutingBuilder


    }

    private FutureRouting createRouting(Number160 locationKey, Number160 domainKey, Set<Number160> contentKeys,
            RoutingConfiguration routingConfiguration, RequestP2PConfiguration requestP2PConfiguration, Type type,
            ChannelCreator channelCreator) {
        return routing.route(new RoutingBuilder(locationKey, domainKey, contentKeys, routingConfiguration.getDirectHits(), routingConfiguration.getMaxNoNewInfo(requestP2PConfiguration.getMinimumResults()), routingConfiguration.getMaxFailures(), routingConfiguration.getMaxSuccess(), routingConfiguration.getParallel(),
                routingConfiguration.isForceTCP()), type, channelCreator);
    }
View Full Code Here


                FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(1, 0);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            }

            RoutingBuilder routingBuilder = new RoutingBuilder();
            if (tcp) {
                routingBuilder.forceTCP(true);
            }
            routingBuilder.locationKey(peers[6].peerID());
            routingBuilder.maxDirectHits(0);
            routingBuilder.setMaxNoNewInfo(0);
            routingBuilder.maxFailures(0);
            routingBuilder.maxSuccess(100);
            routingBuilder.parallel(1);

            FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc);

            fr.awaitUninterruptibly();
            // do verification
View Full Code Here

                FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            }

            RoutingBuilder routingBuilder = new RoutingBuilder();
            if (tcp) {
                routingBuilder.forceTCP(true);
            }
            routingBuilder.locationKey(peers[6].peerID());
            routingBuilder.maxDirectHits(0);
            routingBuilder.setMaxNoNewInfo(0);
            routingBuilder.maxFailures(0);
            routingBuilder.maxSuccess(100);
            routingBuilder.parallel(2);

            FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc);

            fr.awaitUninterruptibly();
            // do verification
View Full Code Here

                FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(3, 0);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            }

            RoutingBuilder routingBuilder = new RoutingBuilder();
            if (tcp) {
                routingBuilder.forceTCP(true);
            }
            routingBuilder.locationKey(peers[6].peerID());
            routingBuilder.maxDirectHits(0);
            routingBuilder.setMaxNoNewInfo(0);
            routingBuilder.maxFailures(0);
            routingBuilder.maxSuccess(100);
            routingBuilder.parallel(3);

            FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc);

            fr.awaitUninterruptibly();
            // do verification
View Full Code Here

                FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(1, 0);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            }

            RoutingBuilder routingBuilder = new RoutingBuilder();
            if (tcp) {
                routingBuilder.forceTCP(true);
            }
            routingBuilder.locationKey(peers[20].peerID());
            routingBuilder.maxDirectHits(0);
            routingBuilder.setMaxNoNewInfo(0);
            routingBuilder.maxFailures(0);
            routingBuilder.maxSuccess(100);
            routingBuilder.parallel(1);

            FutureRouting fr = peers[500].distributedRouting().route(routingBuilder, request, cc);

            fr.awaitUninterruptibly();
            // do verification
View Full Code Here

                    FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(res, 0);
                    fcc.awaitUninterruptibly();
                    cc = fcc.channelCreator();
                }

                RoutingBuilder routingBuilder = new RoutingBuilder();
                if (tcp) {
                    routingBuilder.forceTCP(true);
                }
                routingBuilder.locationKey(peers[rnd1.nextInt(peers.length)].peerID());
                routingBuilder.maxDirectHits(0);
                routingBuilder.setMaxNoNewInfo(0);
                routingBuilder.maxFailures(0);
                routingBuilder.maxSuccess(100);
                routingBuilder.parallel(res);

                FutureRouting frr = peers[rnd2.nextInt(peers.length)].distributedRouting().route(
                        routingBuilder, request, cc);

                frs.add(frr);
View Full Code Here

                    FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(1, 0);
                    fcc.awaitUninterruptibly();
                    cc = fcc.channelCreator();
                }

                RoutingBuilder routingBuilder = new RoutingBuilder();
                if (tcp) {
                    routingBuilder.forceTCP(true);
                }
                routingBuilder.maxDirectHits(0);
                routingBuilder.setMaxNoNewInfo(5);
                routingBuilder.maxFailures(100);
                routingBuilder.maxSuccess(100);
                routingBuilder.parallel(1);

                FutureDone<Pair<FutureRouting,FutureRouting>> fm = peers[i].distributedRouting().bootstrap(
                        peerAddresses, routingBuilder, cc);
                fm.awaitUninterruptibly();
                // do verification
View Full Code Here

                    FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0);
                    fcc.awaitUninterruptibly();
                    cc = fcc.channelCreator();
                }

                RoutingBuilder routingBuilder = new RoutingBuilder();
                if (tcp) {
                    routingBuilder.forceTCP(true);
                }
                routingBuilder.locationKey(find);
                routingBuilder.maxDirectHits(Integer.MAX_VALUE);
                routingBuilder.setMaxNoNewInfo(5);
                routingBuilder.maxFailures(10);
                routingBuilder.maxSuccess(20);
                routingBuilder.parallel(2);

                FutureRouting frr = peers[50].distributedRouting().route(routingBuilder, Type.REQUEST_1,
                        cc);

                frr.awaitUninterruptibly();
View Full Code Here

        }
    }

    public RoutingBuilder createBuilder(RequestP2PConfiguration requestP2PConfiguration,
            RoutingConfiguration routingConfiguration) {
        RoutingBuilder routingBuilder = new RoutingBuilder();
        routingBuilder.parallel(routingConfiguration.parallel());
        routingBuilder.setMaxNoNewInfo(routingConfiguration.maxNoNewInfo(requestP2PConfiguration
                .minimumResults()));
        routingBuilder.maxDirectHits(routingConfiguration.maxDirectHits());
        routingBuilder.maxFailures(routingConfiguration.maxFailures());
        routingBuilder.maxSuccess(routingConfiguration.maxSuccess());
        return routingBuilder;
    }
View Full Code Here

                .minimumResults(), builder.dataSet().size());
        builder.futureChannelCreator().addListener(new BaseFutureAdapter<FutureChannelCreator>() {
            @Override
            public void operationComplete(final FutureChannelCreator future) throws Exception {
                if (future.isSuccess()) {
                  final RoutingBuilder routingBuilder = createBuilder(builder);
                  final FutureRouting futureRouting = routing.route(routingBuilder, Type.REQUEST_1, future.channelCreator());
                 
                    futureDHT.futureRouting(futureRouting);
                    futureRouting.addListener(new BaseFutureAdapter<FutureRouting>() {
                        @Override
View Full Code Here

TOP

Related Classes of net.tomp2p.p2p.builder.RoutingBuilder

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.