Package java.util.concurrent

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


                TimeUnit.MILLISECONDS );


        Thread.sleep( 10200 );

        executor.shutdownNow();
        ksession.halt();
        t.join();

        if (t.getError() != null) {
            fail(t.getError().getMessage());
View Full Code Here


            context.error(e);
         }
      }
      try {
         sessionPingTask.cancel(true);
         executor.shutdownNow();
         config.save();
         console.stop();
      } catch (Exception e) {
      }
   }
View Full Code Here

            ViewProcessor vp = new RemoteViewProcessor(componentInfo.getUri(), jmsConnector, scheduler);
            toolContext.setViewProcessor(vp);
            toolContext.setContextManager(new Closeable() {
              @Override
              public void close() throws IOException {
                scheduler.shutdownNow();
                jmsConnector.close();
              }
            });
          } else {
            String clazzName = componentInfo.getAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA);
View Full Code Here

    private void stop() {
        ScheduledExecutorService executor = this.executor;
        if (executor == null) {
            return;
        }
        executor.shutdownNow();
        this.executor = null;
    }

    private class NotifyingTask implements Runnable {
        public void run() {
View Full Code Here

      Thread.currentThread().sleep(500);
    } catch(InterruptedException ie) {
      ;//do nothing
    }
   
    service.shutdownNow();
   
    //check that the right words have been retrieved
    Assert.assertEquals( "lie", runner1.word.getBaseForm());
    Assert.assertEquals("bark", runner2.word.getBaseForm());
  }
View Full Code Here

        {
            executor.schedule( new Runnable()
            {
                public void run()
                {
                    executor.shutdownNow();
                }
            }, stopAfter, TimeUnit.SECONDS );
        }
        if ( !report )
        {
View Full Code Here

        }
        if ( !report )
        {
            System.in.read();
            System.out.println();
            executor.shutdownNow();
        }

        session.output.println( "" );
    }
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.