Examples of shutdown()


Examples of com.packtpub.java7.concurrency.chapter7.recipe05.task.MyScheduledThreadPoolExecutor.shutdown()

    TimeUnit.SECONDS.sleep(10);

    /*
     * Shutdown the executor
     */
    executor.shutdown();
   
    /*
     * Wait for the finalization of the executor
     */
    executor.awaitTermination(1, TimeUnit.DAYS);
View Full Code Here

Examples of com.planet_ink.coffee_web.util.CWThreadExecutor.shutdown()

    int total2=0;
    for(Integer i : todone)
      total2+=i.intValue();
    if((total != total2)||(todone.size()!=numObjects))
      fail("FAIL, "+total+"!="+total2+", returned="+todone.size());
    executor.shutdown();
    System.out.println("Executor smoke test: PASS");
  }

  @Test
  public void requestStatsTester()
View Full Code Here

Examples of com.rsa.authagent.authapi.AuthSessionFactory.shutdown()

        {
            AuthSessionFactory api = AuthSessionFactory.getInstance(configPath);
            AuthSession authSession = api.createUserSession();
            int status = authSession.check(username, password);
            authSession.close();
            api.shutdown();
            valid = (status == AuthSession.ACCESS_OK);
        }
        catch (Exception e)
        {
            // an exception is expected when bad credentials are used
View Full Code Here

Examples of com.senseidb.svc.api.SenseiService.shutdown()

  public static void main(String[] args) throws Exception{
    File idxDir = new File("/tmp/sensei-example-cars/node1/shard0");
    SenseiService svc = new LocalQueryOnlySenseiServiceImpl(idxDir);
    SenseiResult res = svc.doQuery(new SenseiRequest());
    System.out.println(res.getTotalDocs());
    svc.shutdown();
  }
}
View Full Code Here

Examples of com.shop.cache.api.server.SCServer.shutdown()

      {
        @Override
        public void run()
        {
          System.out.println("Shutting down...");
          server.shutdown();
        }
      }
    );
    hook.setDaemon(true);
    Runtime.getRuntime().addShutdownHook(hook);
View Full Code Here

Examples of com.soulgalore.crawler.core.impl.DefaultCrawler.shutdown()

                        .build();
        DefaultCrawler crawler =
                new DefaultCrawler(new ResponseFetcher(processor), Executors.newFixedThreadPool(10),
                        new CompositeURLParser(new FramePageURLParser(), new AhrefPageURLParser()));
        crawler.getUrls(apiConfig);
        crawler.shutdown();
    }

    private class ResponseFetcher extends HTTPClientResponseFetcher {

        private final DocumentProcessor processor;
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.shutdown()

         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         RecordedRequest deleteRequest = server.takeRequest();
         assertEquals(deleteRequest.getRequestLine(),
               "DELETE /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer/myObject HTTP/1.1");
      } finally {
         server.shutdown();
      }
   }
  
   public void copyObject() throws Exception {
      MockWebServer server = mockOpenStackServer();
View Full Code Here

Examples of com.subhajit.embeddable.activemq.EmbeddedActiveMQ.shutdown()

        EmbeddedActiveMQ activeMQ = new EmbeddedActiveMQ(
            installationDir, 20000);
        activeMQ.setup();
        activeMQ.configure();
        activeMQ.startup(10000);
        activeMQ.shutdown(10000);
        activeMQ.uninstall();
      } finally {
        if (tmpDir != null && tmpDir.exists()) {
          FileUtils.deleteDirectoryAndContents(tmpDir);
        }
View Full Code Here

Examples of com.subhajit.embeddable.derby.EmbeddedDerby2.shutdown()

      derby.setup();
      derby.startup(10000);
    } finally {
      if (derby != null) {
        if ( derby.isRunning() ){
          derby.shutdown(10000);
        }
        derby.uninstall();
      }
    }
  }
View Full Code Here

Examples of com.subhajit.embeddable.opends.EmbeddedOpenDS.shutdown()

        } finally {
          if (ctx != null) {
            ctx.close();
          }
        }
        openDs.shutdown(5000);
      } catch (Throwable exc) {
        thrown = exc;
      } finally {
        if (openDs != null) {
          openDs.uninstall();
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.