Examples of shutdown()


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

Examples of net.tomp2p.nat.FutureRelayNAT.shutdown()

                return peer;

            }
            else {
                log.error("Bootstrap using relay failed " + futureRelayNAT.failedReason());
                futureRelayNAT.shutdown();
                peer.shutdown().awaitUninterruptibly();
                return null;
            }
        } catch (IOException e) {
            log.error("Bootstrap using relay failed. Exception " + e.getMessage());
View Full Code Here

Examples of net.tomp2p.p2p.Peer.shutdown()

    assertEquals(content.get(numberOfContent - 1).getTestString(), ((H2HTestData) future.getData()
        .object()).getTestString());

    p1.shutdown().awaitUninterruptibly();
    p2.shutdown().awaitUninterruptibly();
  }

  @Test
  public void getFromToTest2() throws IOException, ClassNotFoundException, InterruptedException {
    Peer p1 = new PeerMaker(Number160.createHash(1)).setEnableIndirectReplication(true).ports(4838)
View Full Code Here

Examples of net.tomp2p.p2p.Shutdown.shutdown()

        System.out.println("put again...");
      }
    });
        Thread.sleep(NINE_SECONDS);
        System.out.println("stop replication");
        shutdown.shutdown();
        RemoveBuilder removeBuilder = peers[1].remove(Number160.ONE);
        replication.start(removeBuilder, 1000, 9, new AutomaticFuture() {
      @Override
      public void futureCreated(BaseFuture future) {
        System.out.println("remove again...");
View Full Code Here

Examples of net.tomp2p.replication.DirectReplication.shutdown()

        System.out.println("remove again...");
      }
    });
        Thread.sleep(NINE_SECONDS);
        System.out.println("done");
        replication.shutdown().awaitUninterruptibly();
    }
}
View Full Code Here

Examples of net.tralfamadore.persistence.EntityManagerProvider.shutdown()

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        // Shut down our entity manager
        EntityManagerProvider entityManagerProvider = CmfContext.getInstance().getEntityManagerProvider();
        if(entityManagerProvider != null)
            entityManagerProvider.shutdown();
    }
}
View Full Code Here

Examples of net.xeoh.plugins.base.PluginManager.shutdown()

        for(int i=0; i<10000; i++) {
            System.out.println();
            System.out.println("Run " + i);
            PluginManager manager = PluginManagerFactory.createPluginManager();
            manager.addPluginsFrom(ClassURI.CLASSPATH);
            manager.shutdown();
        }
    }

}
View Full Code Here

Examples of net.xoetrope.xui.XApplicationContext.shutdown()

    }

    public void doExit()
    {
        XApplicationContext appContext = project.getApplicationContext();
        appContext.shutdown();
    }

    public void exitModeChanged()
    {
        // This mode will have no effect unless there is some background thread
View Full Code Here

Examples of org.I0Itec.zkclient.ZkServer.shutdown()

    }

    Thread shutdownhook = new Thread(new Runnable() {
      @Override
      public void run() {
        server.shutdown();
      }
    });
    Runtime.getRuntime().addShutdownHook(shutdownhook);
    Thread.sleep(10000);
View Full Code Here

Examples of org.activiti.engine.impl.asyncexecutor.AsyncExecutor.shutdown()

    } finally {
      if (processEngineConfiguration.isAsyncExecutorEnabled() == false) {
        jobExecutor.shutdown();
      } else {
        asyncExecutor.shutdown();
      }
    }
  }

  public void waitForJobExecutorOnCondition(long maxMillisToWait, long intervalMillis, Callable<Boolean> condition) {
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.