Package net.tomp2p.p2p.builder

Examples of net.tomp2p.p2p.builder.PingBuilder


            long nextDelay = timeToHeartBeatMillis - (currentTime - lastIoTime);
           
            if(peerConnection!=null && nextDelay <= 0) {
                LOG.debug("sending heart beat to {}, {}", peerConnection.remotePeer(),
                    (peerConnection.channelFuture() != null ? peerConnection.channelFuture().channel() : null));
                PingBuilder builder = pingBuilderFactory.create();
                BaseFuture baseFuture = builder.peerConnection(peerConnection).start();
                builder.notifyAutomaticFutures(baseFuture);
            } else {
              LOG.debug("Not sending heart beat to {}, {}", peerConnection.remotePeer(),
                    (peerConnection.channelFuture() != null ? peerConnection.channelFuture().channel() : null));
            }
        }
View Full Code Here


    FuturePing[] forks = new FuturePing[peerSocketAddresses.size()];
    int index = 0;
    for (PeerSocketAddress psa : peerSocketAddresses) {
      if (psa != null) {
        InetSocketAddress inetSocketAddress = PeerSocketAddress.createSocketUDP(psa);
        PingBuilder pingBuilder = pingBuilderFactory.create();
        forks[index++] = pingBuilder.inetAddress(inetSocketAddress.getAddress())
                .port(inetSocketAddress.getPort()).start();
      }
    }
    FutureForkJoin<FuturePing> ffk = new FutureForkJoin<FuturePing>(1, true, new AtomicReferenceArray<FuturePing>(
            forks));
View Full Code Here

    public ShutdownBuilder announceShutdown() {
        return new ShutdownBuilder(this);
    }

    public PingBuilder ping() {
        return new PingBuilder(this);
    }
View Full Code Here

TOP

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

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.