Examples of releaseExternalResources()


Examples of org.jboss.netty.bootstrap.ClientBootstrap.releaseExternalResources()

        channel.write(request);

        channel.getCloseFuture().awaitUninterruptibly();

        clientBootstrap.releaseExternalResources();

        logger.debug("Finished downloading s4r file through http {}", uri.toString());
        try {
            return new FileInputStream(tmpFile);
        } catch (FileNotFoundException e) {
View Full Code Here

Examples of org.jboss.netty.bootstrap.ClientBootstrap.releaseExternalResources()

    ChannelFuture future = bootstrap.connect(new InetSocketAddress(host, port));

    // Wait until the connection attempt succeeds or fails.
    Channel channel = future.awaitUninterruptibly().getChannel();
    if (!future.isSuccess()) {
      bootstrap.releaseExternalResources();
      throw new IOException(future.getCause());
    }

    String query = uri.getPath()
        + (uri.getRawQuery() != null ? "?" + uri.getRawQuery() : "");
View Full Code Here

Examples of org.jboss.netty.bootstrap.ClientBootstrap.releaseExternalResources()

    // Wait for the server to close the connection.
    channel.getCloseFuture().awaitUninterruptibly();

    // Shut down executor threads to exit.
    bootstrap.releaseExternalResources();

    return file;
  }

  public URI getURI() {
View Full Code Here

Examples of org.jboss.netty.bootstrap.ClientBootstrap.releaseExternalResources()

    }
    long end = System.currentTimeMillis();
    System.out.println(CALLS * 1000 / (end - start) + " calls per second");

    channel.close();
    cb.releaseExternalResources();
  }
}
View Full Code Here

Examples of org.jboss.netty.bootstrap.ConnectionlessBootstrap.releaseExternalResources()

            }
            if (cc != null) {
                cc.close().awaitUninterruptibly();
            }
            sb.releaseExternalResources();
            cb.releaseExternalResources();
        }
    }

    private static ChannelBuffer wrapInt(int value) {
        ChannelBuffer buf = ChannelBuffers.buffer(4);
View Full Code Here

Examples of org.jboss.netty.bootstrap.ServerBootstrap.releaseExternalResources()

  }

  public synchronized void stop() {
    accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS);
    ServerBootstrap bootstrap = new ServerBootstrap(channelFactory);
    bootstrap.releaseExternalResources();
  }

  /**
   * Get the worker thread pool for metrics.
   *
 
View Full Code Here

Examples of org.jboss.netty.bootstrap.ServerBootstrap.releaseExternalResources()

  @Override
  public synchronized void stop() {
    try {
      accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS);
      ServerBootstrap bootstrap = new ServerBootstrap(selector);
      bootstrap.releaseExternalResources();
      pipelineFact.destroy();

      localFS.close();
    } catch (Throwable t) {
      LOG.error(t);
View Full Code Here

Examples of org.jboss.netty.bootstrap.ServerBootstrap.releaseExternalResources()

  @Override
  public synchronized void stop() {
    try {
      accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS);
      ServerBootstrap bootstrap = new ServerBootstrap(selector);
      bootstrap.releaseExternalResources();
      pipelineFact.destroy();

      localFS.close();
    } catch (Throwable t) {
      LOG.error(t);
View Full Code Here

Examples of org.jboss.netty.bootstrap.ServerBootstrap.releaseExternalResources()

  @Override
  protected void serviceStop() throws Exception {
    accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS);
    if (selector != null) {
      ServerBootstrap bootstrap = new ServerBootstrap(selector);
      bootstrap.releaseExternalResources();
    }
    if (pipelineFact != null) {
      pipelineFact.destroy();
    }
    if (stateDb != null) {
View Full Code Here

Examples of org.jboss.netty.bootstrap.ServerBootstrap.releaseExternalResources()

  @Override
  public synchronized void stop() {
    accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS);
    ServerBootstrap bootstrap = new ServerBootstrap(selector);
    bootstrap.releaseExternalResources();
    pipelineFact.destroy();
    super.stop();
  }

  @Override
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.