Examples of park()


Examples of freenet.node.Node.park()

              +" opennet: peers: "+opennetPeers+", connected: "+opennetConns);
          seconds++;
          if(opennetConns >= targetPeers) {
            long timeTaken = System.currentTimeMillis()-startTime;
            System.out.println("Completed bootstrap ("+targetPeers+" peers) in "+timeTaken+"ms ("+TimeUtil.formatTime(timeTaken)+")");
            node.park();
            System.exit(0);
          }
        }
        System.err.println("Failed to reach target peers count "+targetPeers+" in 5 minutes.");
    node.park();
View Full Code Here

Examples of freenet.node.Node.park()

            node.park();
            System.exit(0);
          }
        }
        System.err.println("Failed to reach target peers count "+targetPeers+" in 5 minutes.");
    node.park();
        System.exit(EXIT_FAILED_TARGET);
      } catch (Throwable t) {
        System.err.println("CAUGHT: "+t);
        t.printStackTrace();
        try {
View Full Code Here

Examples of freenet.node.Node.park()

      } catch (Throwable t) {
        System.err.println("CAUGHT: "+t);
        t.printStackTrace();
        try {
          if(node != null)
            node.park();
        } catch (Throwable t1) {}
        System.exit(EXIT_THREW_SOMETHING);
      }
  }
View Full Code Here

Examples of freenet.node.Node.park()

        PooledExecutor executor = new PooledExecutor();
        secondNode = NodeStarter.createTestNode(DARKNET_PORT, OPENNET_PORT, dir.getPath(), false, Node.DEFAULT_MAX_HTL, 0, random, executor, 1000, 5*1024*1024, true, true, true, true, true, true, true, 12*1024, false, true, false, false, ipOverride);
        secondNode.start(true);

    if (!TestUtil.waitForNodes(secondNode)) {
      secondNode.park();
      System.exit(EXIT_FAILED_TARGET);
    }

        // Fetch the data
        long startFetchTime = System.currentTimeMillis();
View Full Code Here

Examples of freenet.node.Node.park()

      System.exit(EXIT_FETCH_FAILED);
      return;
    }
    long endFetchTime = System.currentTimeMillis();
    System.out.println("RESULT: Fetch took "+(endFetchTime-startFetchTime)+"ms ("+TimeUtil.formatTime(endFetchTime-startFetchTime)+") of "+uri+" .");
    secondNode.park();
    System.exit(0);
      } catch (Throwable t) {
        System.err.println("CAUGHT: "+t);
        t.printStackTrace();
        try {
View Full Code Here

Examples of freenet.node.Node.park()

      } catch (Throwable t) {
        System.err.println("CAUGHT: "+t);
        t.printStackTrace();
        try {
          if(secondNode != null)
            secondNode.park();
        } catch (Throwable t1) {}
        System.exit(EXIT_THREW_SOMETHING);
      }
  }
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.