Package net.tomp2p.dht

Examples of net.tomp2p.dht.PeerDHT.shutdown()


      exampleSendOne(peers[14]);
      Thread.sleep(60000);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      master.shutdown();
    }
  }

  private static void exampleSendOne(PeerDHT peer) {
    RequestP2PConfiguration requestP2PConfiguration = new RequestP2PConfiguration(1, 10, 0);
View Full Code Here


                MyData<String> myData = (MyData<String>) data.object();
        System.out.println("key: " + myData.key() + ", domain: " + myData.domain() + ", content: "
                + myData.content() + ", data: " + myData.data());
      }
    } finally {
      master.shutdown();
    }
  }

  private static class MyPeer {
    final private PeerDHT peer;
View Full Code Here

            exampleUnQL(peers);
        } catch (Exception e) {
            e.printStackTrace();
        }
        finally {
            master.shutdown();
        }
    }

    private static void exampleUnQL(PeerDHT[] peers) throws IOException, ClassNotFoundException {
        execute(peers[22], new Query(QUERY_1));
View Full Code Here

    } finally {
      if (master != null) {
        master.shutdown().await();
      }
      if (unreachablePeer != null) {
        unreachablePeer.shutdown().await();
      }
    }
  }

  @Test
View Full Code Here

    } finally {
      if(master != null) {
        master.shutdown().await();
      }
      if(unreachablePeer != null) {
        unreachablePeer.shutdown().await();
      }
    }
  }

  @Test
View Full Code Here

      }
      if(unreachablePeer1 != null) {
        unreachablePeer1.shutdown().await();
      }
      if(unreachablePeer2 != null) {
        unreachablePeer2.shutdown().await();
      }
    }
  }

  @Test
View Full Code Here

    } finally {
      if (sender != null) {
        sender.shutdown().await();
      }
      if (receiver != null) {
        receiver.shutdown().await();
      }
    }
  }

  @Test
View Full Code Here

    } finally {
      if (sender != null) {
        sender.shutdown().await();
      }
      if (receiver != null) {
        receiver.shutdown().await();
      }
    }
  }

  @Test
View Full Code Here

       }
       if(unreachablePeer1 != null) {
         unreachablePeer1.shutdown().await();
       }
       if(unreachablePeer2 != null) {
         unreachablePeer2.shutdown().await();
       }
         }
    }
 
  @Test
View Full Code Here

    } finally {
      if (sender != null) {
        sender.shutdown().await();
      }
      if (receiver != null) {
        receiver.shutdown().await();
      }
    }
  }

  @Test
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.