Package net.tomp2p.futures

Examples of net.tomp2p.futures.FutureChannelCreator.channelCreator()


            byte[] me1 = new byte[50 * 1024 * 1024];
            tmp.put(new Number160(77), new Data(me1));

            FutureChannelCreator fcc = sender.peer().connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            PutBuilder putBuilder = new PutBuilder(sender, new Number160(33));
            putBuilder.domainKey(Number160.createHash("test"));
            putBuilder.dataMapContent(tmp);
            putBuilder.versionKey(Number160.ZERO);
View Full Code Here


            byte[] me1 = new byte[50 * 1024 * 1024];
            tmp.put(new Number160(77), new Data(me1));

            FutureChannelCreator fcc = sender.peer().connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            PutBuilder putBuilder = new PutBuilder(sender, new Number160(33));
            putBuilder.domainKey(Number160.createHash("test"));
            putBuilder.dataMapContent(tmp);
            putBuilder.idleTCPSeconds(Integer.MAX_VALUE);
View Full Code Here

            Map<Number160, Data> dataMap = new HashMap<Number160, Data>();
            dataMap.put(Number160.ZERO, new Data("string"));

            FutureChannelCreator fcc = master.peer().connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            PutBuilder putBuilder = new PutBuilder(master, location);
            putBuilder.domainKey(location);
            putBuilder.dataMapContent(dataMap);
            putBuilder.versionKey(Number160.ZERO);
View Full Code Here

            im.addResponsibilityListener(responsibilityListener);
            im.start();

            FutureChannelCreator fcc = master.peer().connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            PutBuilder putBuilder = new PutBuilder(master, loc);
            putBuilder.domainKey(domainKey);
            putBuilder.dataMapContent(contentMap);
            putBuilder.versionKey(Number160.ZERO);
View Full Code Here

      putBuilder.dataMapContent(dataMap);
      putBuilder.versionKey(Number160.ZERO);

      FutureChannelCreator fcc = master.peer().connectionBean().reservation().create(0, 1);
      fcc.awaitUninterruptibly();
      cc = fcc.channelCreator();

      // put test data
      FutureResponse fr = master.storeRPC().put(master.peerAddress(), putBuilder, cc);
      fr.awaitUninterruptibly();
      Assert.assertEquals(joins[0][0], replicateI.get());
View Full Code Here

        final FutureChannelCreator fcc = connectionBean().reservation().createPermanent(1);
        fcc.addListener(new BaseFutureAdapter<FutureChannelCreator>() {
            @Override
            public void operationComplete(final FutureChannelCreator future) throws Exception {
                if (future.isSuccess()) {
                    final ChannelCreator cc = fcc.channelCreator();
                    final PeerConnection peerConnection = new PeerConnection(destination, cc, heartBeatMillis);
                    futureDone.done(peerConnection);
                } else {
                    futureDone.failed(future);
                }
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.