Examples of releaseExternalResources()


Examples of com.facebook.presto.jdbc.internal.netty.channel.ChannelFactory.releaseExternalResources()

     * {@link ChannelFactory#releaseExternalResources()}.
     */
    public void releaseExternalResources() {
        ChannelFactory factory = this.factory;
        if (factory != null) {
            factory.releaseExternalResources();
        }
    }

    /**
     * This method simply delegates the call to
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.channel.FileRegion.releaseExternalResources()

                    }
                } finally {
                    if (fr instanceof DefaultFileRegion) {
                        DefaultFileRegion dfr = (DefaultFileRegion) fr;
                        if (dfr.releaseAfterTransfer()) {
                            fr.releaseExternalResources();
                        }
                    }
                }
            } else {
                ChannelBuffer a = (ChannelBuffer) message;
View Full Code Here

Examples of com.googlecode.protobuf.pro.duplex.server.DuplexTcpServerBootstrap.releaseExternalResources()

        try {
            bootstrap.bind();
        } catch (ChannelException e) {
            // releasing resources allows the server to exit
            bootstrap.releaseExternalResources();
            throw e;
        }
    }

    private static DuplexTcpServerBootstrap startProtoServer(int port) {
View Full Code Here

Examples of io.netty.bootstrap.ClientBootstrap.releaseExternalResources()

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

        // Prepare the HTTP request.
        HttpRequest request = new DefaultHttpRequest(
View Full Code Here

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

    final Channel server = bootstrap.bind(new InetSocketAddress(port));

    svc.addShutdownHook(new Runnable() {
      @Override
      public void run() {
        bootstrap.releaseExternalResources();
        factory.getWebSocketServerHandler().stop();
        server.close();
        svc = null;
        log.info("web socket server stopped.");
      }
View Full Code Here

Examples of io.netty.channel.ChannelFactory.releaseExternalResources()

     */
    @Override
    public void releaseExternalResources() {
        ChannelFactory factory = this.factory;
        if (factory != null) {
            factory.releaseExternalResources();
        }
    }

    /**
     * Returns {@code true} if and only if the specified {@code map} is an
View Full Code Here

Examples of io.netty.channel.DefaultFileRegion.releaseExternalResources()

                new DefaultFileRegion(raf.getChannel(), 0, fileLength);
            writeFuture = ch.write(region);
            writeFuture.addListener(new ChannelFutureProgressListener() {
                @Override
                public void operationComplete(ChannelFuture future) {
                    region.releaseExternalResources();
                }

                @Override
                public void operationProgressed(
                        ChannelFuture future, long amount, long current, long total) {
View Full Code Here

Examples of io.netty.channel.FileRegion.releaseExternalResources()

                            }
                        }
                    }
                } finally {
                    if (fr.releaseAfterTransfer()) {
                        fr.releaseExternalResources();
                    }

                }
            } else {
                ChannelBuffer a = (ChannelBuffer) message;
View Full Code Here

Examples of io.netty.channel.socket.DatagramChannelFactory.releaseExternalResources()

        if (!c.getCloseFuture().awaitUninterruptibly(5000)) {
            System.err.println("QOTM request timed out.");
            c.close().awaitUninterruptibly();
        }

        f.releaseExternalResources();
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
View Full Code Here

Examples of io.netty.channel.socket.nio.NioDatagramChannelFactory.releaseExternalResources()

        if (!c.getCloseFuture().awaitUninterruptibly(5000)) {
            System.err.println("QOTM request timed out.");
            c.close().awaitUninterruptibly();
        }

        f.releaseExternalResources();
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
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.