Package java.util.concurrent

Examples of java.util.concurrent.ScheduledThreadPoolExecutor.shutdownNow()


    // Stop executor. It was only needed to poll AE initialization status.
    // Since deploy() completed
    // the UIMA AS service either succeeded initializing or it failed. In
    // either case we no longer
    // need to poll for initialization status
    executor.shutdownNow();

    if (serviceDeployer == null || serviceDeployer.initializationFailed()) {
      currentState = ProcessState.FailedInitialization;
      System.out
          .println(">>> Failed to Deploy UIMA Service. Check UIMA Log for Details");
View Full Code Here


        assertEquals("", 1D, inst.getSamplers().get("a").get("1").getValue(), 0.01D);
        assertEquals("", 2D, inst.getSamplers().get("a").get("2").getValue(), 0.02D);
        assertEquals("", 5D, inst.getSamplers().get("b").get("1").getValue(), 0.5D);

        scheduledExecutorService.shutdownNow();
    }

    public void testAll() throws Exception {
        Instrumentation inst = new Instrumentation();
        inst.addVariable("a", "1", new Instrumentation.Variable<Long>() {
View Full Code Here

        assertEquals("", 1D, inst.getSamplers().get("a").get("1").getValue(), 0.01D);
        assertEquals("", 2D, inst.getSamplers().get("a").get("2").getValue(), 0.02D);
        assertEquals("", 5D, inst.getSamplers().get("b").get("1").getValue(), 0.5D);

        scheduledExecutorService.shutdownNow();
    }

    public void testAll() throws Exception {
        Instrumentation inst = new Instrumentation();
        inst.addVariable("a", "1", new Instrumentation.Variable<Long>() {
View Full Code Here

    final ServletContext context = contextEvent.getServletContext();

    final Injector injector = (Injector) context.getAttribute(INJECTOR);
    final ScheduledThreadPoolExecutor timer = injector
        .getInstance(ScheduledThreadPoolExecutor.class);
    timer.shutdownNow();

    context.removeAttribute(INJECTOR);
    context.removeAttribute(DATE_NAME);

    super.contextDestroyed(contextEvent);
View Full Code Here

            assertEquals("", 1D, inst.getSamplers().get("a").get("1").getValue(), 0.01D);
            assertEquals("", 2D, inst.getSamplers().get("a").get("2").getValue(), 0.02D);
            assertEquals("", 4D, inst.getSamplers().get("b").get("1").getValue(), 0.5D);

        } finally {
            scheduledExecutorService.shutdownNow();
        }
    }

    public void testAll() throws Exception {
        Instrumentation inst = new Instrumentation();
View Full Code Here

            assertEquals(1D, inst.getMetricRegistry().getHistograms().get("a.1.histogram").getSnapshot().getMean(), 0.01D);
            assertEquals(2D, inst.getMetricRegistry().getHistograms().get("a.2.histogram").getSnapshot().getMean(), 0.02D);
            assertEquals(4D, inst.getMetricRegistry().getHistograms().get("b.1.histogram").getSnapshot().getMean(), 0.5D);
        } finally {
            scheduledExecutorService.shutdownNow();
        }
    }

    public void testUnsupportedOpertation() {
        MetricsInstrumentation instr = new MetricsInstrumentation();
View Full Code Here

        // this is required to not causing server to hang from non-daemon threads
        // this also makes sure all open Channels are closed to I *think*
        logger.info("Shutting down client bootstrap and executors...");
        clientBootstrap.destroy();
        executor.shutdownNow();
        monitorExecutor.shutdownNow();
       
        logger.info("Done. Exiting");
    }

    /**
 
View Full Code Here

        // this is required to not causing server to hang from non-daemon threads
        // this also makes sure all open Channels are closed to I *think*
        logger.info("Shutting down client bootstrap and executors...");
        clientBootstrap.destroy();
        executor.shutdownNow();
        monitorExecutor.shutdownNow();
       
        logger.info("Done. Exiting");
    }

    /**
 
View Full Code Here

        // this is required to not causing server to hang from non-daemon threads
        // this also makes sure all open Channels are closed to I *think*
        logger.info("Shutting down client bootstrap and executors...");
        clientBootstrap.destroy();
        executor.shutdownNow();
        monitorExecutor.shutdownNow();
       
        logger.info("Done. Exiting");
    }
   
   
View Full Code Here

        // this is required to not causing server to hang from non-daemon threads
        // this also makes sure all open Channels are closed to I *think*
        logger.info("Shutting down client bootstrap and executors...");
        clientBootstrap.destroy();
        executor.shutdownNow();
        monitorExecutor.shutdownNow();
       
        logger.info("Done. Exiting");
    }

    /**
 
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.