Examples of ChannelGroupFuture


Examples of org.jboss.netty.channel.group.ChannelGroupFuture

    // No-op.
  }
 
  @Override
  public void close() {
    ChannelGroupFuture future = allChannels.close();
    future.awaitUninterruptibly();
    channelFactory.releaseExternalResources();
    closed.countDown();
  }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

    @Override
    protected void doStop() throws Exception {
        LOG.debug("Netty consumer unbinding from: {}", configuration.getAddress());

        // close all channels
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

    @Override
    protected void doStop() throws Exception {
        LOG.debug("Stopping producer at address: {}", configuration.getAddress());
        // close all channels
        LOG.trace("Closing {} channels", ALL_CHANNELS.size());
        ChannelGroupFuture future = ALL_CHANNELS.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

        if (LOG.isInfoEnabled()) {
            LOG.info("Netty consumer unbinding from: " + configuration.getAddress());
        }

        // close all channels
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

        }
    }

    private void closeConnection() throws Exception {
        // close all channels
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

    @Override
    protected void doStop() throws Exception {
        LOG.debug("Netty consumer unbinding from: {}", configuration.getAddress());

        // close all channels
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

        // and then release other resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

    // Added by Alex 2010-08-09
    if (channel != null) {
      channel.close();
    }
    ChannelGroupFuture future = allChannels.close();
    future.awaitUninterruptibly();
    channel.getFactory().releaseExternalResources();
   
  }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

    protected void doStop() throws Exception {
        LOG.debug("Netty consumer unbinding from: {}", configuration.getAddress());

        // close all channels
        LOG.trace("Closing {} channels", allChannels.size());
        ChannelGroupFuture future = allChannels.close();
        future.awaitUninterruptibly();

        // close server external resources
        if (channelFactory != null) {
            channelFactory.releaseExternalResources();
        }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

                    gate.acquire();
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
            ChannelGroupFuture future = channels.write(buffer);
            future.addListener(new ChannelGroupFutureListener() {
                @Override
                public void operationComplete(ChannelGroupFuture future) throws Exception {
                    master.sentBytes(reportBytes * peerCount);
                    state.returnSendBuffer(buffer);
                    if (watcher != null) {
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture

        public boolean shutdown(long timeout, TimeUnit unit) throws InterruptedException {
            // Make sure we skip creating connection from now on.
            isShutdown = true;

            long start = System.nanoTime();
            ChannelGroupFuture future = allChannels.close();

            channelFactory.releaseExternalResources();

            return future.await(timeout, unit)
                && bossExecutor.awaitTermination(timeout - Cluster.timeSince(start, unit), unit)
                && workerExecutor.awaitTermination(timeout - Cluster.timeSince(start, unit), unit);
        }
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.