Examples of shutdown()


Examples of io.netty.bootstrap.Bootstrap.shutdown()

            ChannelFuture f = b.connect(host, port).sync();

            // Wait until the connection is closed.
            f.channel().closeFuture().sync();
        } finally {
            b.shutdown();
        }
    }

    public static void main(String[] args) throws Exception {
        // Print usage if no argument is specified.
View Full Code Here

Examples of io.netty.bootstrap.ServerBootstrap.shutdown()

            //closeFuture.sync();
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } finally {
            bootstrap.shutdown();
        }
    }

    /**
     * {@inheritedDoc}
 
View Full Code Here

Examples of jade.core.Runtime.shutDown()

    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
        public void run()
        {
            rt.shutDown();
        }
    });
   
    AgentController initiator = cc.createNewAgent("Initiator",
        InitiatorAgent.class.getCanonicalName(), null);
View Full Code Here

Examples of java.rmi.activation.ActivationSystem.shutdown()

                logFolder = args[i + 1];
                i++;
            } else if (argument.equals("-stop")) { //$NON-NLS-1$
                try {
                    ActivationSystem system = ActivationGroup.getSystem();
                    system.shutdown();
                    // rmi.log.41=RMID was shut down
                    rLog.log(commonDebugLevel, Messages.getString("rmi.log.41")); //$NON-NLS-1$
                    return;
                } catch (Throwable t) {
                    t.printStackTrace();
View Full Code Here

Examples of java.util.concurrent.ForkJoinPool.shutdown()

    ForkJoinPool pool = new ForkJoinPool();
    Task executionTask = new Task(1000000000.0);
    pool.invoke(executionTask);
    System.out.println(pool.toString());
    System.out.println(String.format("Full execution time is %d", executionTask.get()));
    pool.shutdown();
  }

  private static class Task extends RecursiveTask<Long> {
    private static final long serialVersionUID = 1L;
    private static final int THRESHOLD = 10000;
View Full Code Here

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

                    assertThat(EfficientString.fromString(str), is(e));
                }
            });
        }

        executorService.shutdown();
        executorService.awaitTermination(2, TimeUnit.SECONDS);
        // check greater than so that it won't clash with concurrent executions of other tests in surefire
        assertThat(EfficientString.nextIndex()-startIndex, Matchers.greaterThan(total/factor));
    }
View Full Code Here

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

            return srcPaths;
        } catch (IOException e) {
            e.printStackTrace();
            return srcPaths;
        } finally {
            executor.shutdown();
        }
    }

    private static final class ConstantFutureFile implements Future<File> {
        private final File file;
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.shutdown()

  public static void initPool(String poolName, int corePoolSize,
      int maximumPoolSize, int keepAliveTime, TimeUnit timeUnit) {
    ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) poolMap.get(poolName);
    if(threadPoolExecutor!=null) {
      logger.log(Level.FINE, "{0} will be shutdown and re-created", poolName);
      threadPoolExecutor.shutdown();
    }
    threadPoolExecutor = new ThreadPoolExecutor(corePoolSize,
        maximumPoolSize, keepAliveTime, timeUnit,
        new LinkedBlockingQueue<Runnable>());
    NamedThreadFactory threadFactory = new NamedThreadFactory("Thread_Pool_"+poolName);
View Full Code Here

Examples of javax.cache.CacheManager.shutdown()

        String tenantDomain = Util.getTenantDomain();
        Map<String, CacheManager> cacheManagers = globalCacheManagerMap.get(tenantDomain);
        CacheManager cacheManager;
        if (cacheManagers != null) {
            cacheManager = cacheManagers.get(name);
            cacheManager.shutdown();
            return true;
        }
        return false;
    }
View Full Code Here

Examples of javax.jbi.component.ComponentLifeCycle.shutDown()

        componentMock.reset();
        componentMock.replay();
        // configure lifecycle
        lifecycleMock.reset();
        lifecycle.stop();
        lifecycle.shutDown();
        lifecycleMock.replay();
        // shutdown container
        shutdownContainer();
        // check mocks
        bootstrapMock.verify();
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.