Examples of shutdownNow()


Examples of EDU.oswego.cs.dl.util.concurrent.PooledExecutor.shutdownNow()

            p = executor;
            executor = null;
            classLoader = null;
        }
        if (p != null) {
            p.shutdownNow();
        }
    }

    public void doFail() {
        try {
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager.shutdownNow()

                    prevObjectListing = s3service.listNextBatchOfObjects(prevObjectListing);
                }
            }
            s3service.deleteBucket(bucket);
            LOG.info("bucket: " + bucket + " deleted");
            tmx.shutdownNow();
            s3service.shutdown();
        }
    }

}
View Full Code Here

Examples of com.google.common.util.concurrent.ListeningExecutorService.shutdownNow()

      }
    } catch (Throwable t) {
      t.printStackTrace();
      failedCallables.addAll((List) callablesToRun);
    } finally {
      es.shutdownNow();
    }

    if (!failedCallables.isEmpty()) {
      LOG.error(failedCallables.size() + " callable failure(s) occurred:");
      for (PipelineCallable<?> c : failedCallables) {
View Full Code Here

Examples of com.google.common.util.concurrent.ListeningScheduledExecutorService.shutdownNow()

      Closer closer = i.getInstance(Closer.class);
      ListeningScheduledExecutorService executor = createMock(ListeningScheduledExecutorService.class);
      ExecutorServiceModule.shutdownOnClose(executor, closer);

      expect(executor.shutdownNow()).andReturn(ImmutableList.<Runnable> of()).atLeastOnce();

      replay(executor);
      closer.close();

      verify(executor);
View Full Code Here

Examples of com.hazelcast.core.IExecutorService.shutdownNow()

    @Test
    public void testShutdownNow() throws InterruptedException, ExecutionException, TimeoutException {
        final IExecutorService service = client.getExecutorService(randomString());

        service.shutdownNow();

        assertTrueEventually(new AssertTask() {
            public void run() throws Exception {
                assertTrue(service.isShutdown());
            }
View Full Code Here

Examples of com.linkedin.d2.discovery.event.SynchronousExecutorService.shutdownNow()

      if (!latch.await(60, TimeUnit.SECONDS))
      {
        fail("unable to shutdown state");
      }

      executorService.shutdownNow();

      assertTrue(executorService.isShutdown(), "ExecutorService should have shut down!");
    }
  }
View Full Code Here

Examples of com.sun.sgs.nio.channels.AsynchronousChannelGroup.shutdownNow()

        group.shutdown();
        log.info("Awaiting group termination");       
        if (! group.awaitTermination(5, TimeUnit.SECONDS)) {
            log.warning("Forcing group termination");
            group.shutdownNow();
            if (! group.awaitTermination(5, TimeUnit.SECONDS)) {
                log.warning("Group could not be forcibly terminated");
            }
        }
        if (group.isTerminated())
View Full Code Here

Examples of de.fhkn.in.uce.holepunching.core.HolePuncher.shutdownNow()

            if (interrupted) {
                Thread.currentThread().interrupt();
            }
        }
        connectionListener.shutdown();
        hp.shutdownNow();
        // received dummy socket for indicating time limit exceeded
        if (!result.isConnected()) {
            throw new IOException("Could not get socket to: " + targetId);
        }
        logger.info("Returning socket: {}", result);
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.concurrent.ExecutorService.shutdownNow()

        executor.submit(new PooledProducerTask(pcf, QUEUE1_NAME));
      }
     
      // Wait for all message to arrive.
      assertTrue(doneLatch.await(20, TimeUnit.SECONDS));     
      executor.shutdownNow();

      Assert.assertEquals(NUM_MESSAGE_TO_SEND, messageCount.get());

    } finally {
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService.shutdownNow()

  }

  public void testShutdownNowIsPropagatedToTheExecutorOnDestroy() throws Exception {
    MockControl mockScheduledExecutorService = MockControl.createNiceControl(ScheduledExecutorService.class);
    final ScheduledExecutorService executor = (ScheduledExecutorService) mockScheduledExecutorService.getMock();
    executor.shutdownNow();
    mockScheduledExecutorService.setReturnValue(null);
    mockScheduledExecutorService.replay();

    ScheduledExecutorFactoryBean factory = new ScheduledExecutorFactoryBean() {
      protected ScheduledExecutorService createExecutor(int poolSize, ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) {
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.