Package org.ardverk.dht.config

Examples of org.ardverk.dht.config.PingConfig


     
      Contact localhost = routeTable.getIdentity();
      KUID localhostId = localhost.getId();

      if (0 < pingCount) {
        PingConfig pingConfig = cfg.getPingConfig();
        long contactTimeout = cfg.getContactTimeoutInMillis();
       
        Contact[] contacts = routeTable.select(localhostId, pingCount);
        for (Contact contact : contacts) {
          // Don't send PINGs to the localhost!
View Full Code Here


    this.messageDispatcher = messageDispatcher;
  }
 
  public DHTFuture<PingEntity> ping(Contact contact, PingConfig config) {
   
    PingConfig cfg = configProvider.get(config);
   
    DHTProcess<PingEntity> process
      = new PingResponseHandler(messageDispatcher, contact, cfg);
    return futureManager.submit(process, cfg);
  }
View Full Code Here

  }
 
  public DHTFuture<PingEntity> ping(
      SocketAddress dst, PingConfig config) {
   
    PingConfig cfg = configProvider.get(config);
   
    DHTProcess<PingEntity> process
      = new PingResponseHandler(messageDispatcher, dst, cfg);
    return futureManager.submit(process, cfg);
  }
View Full Code Here

    final ContactKey pingKey = new ContactKey(contact);
    DHTFuture<PingEntity> future
      = pingFutures.get(pingKey);
   
    if (future == null) {
      PingConfig pingConfig = config.getPingConfig();
      future = ping(contact, pingConfig);
     
      future.addAsyncFutureListener(new AsyncFutureListener<PingEntity>() {
        @Override
        public void operationComplete(AsyncFuture<PingEntity> future) {
View Full Code Here

TOP

Related Classes of org.ardverk.dht.config.PingConfig

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.