Package org.xbib.elasticsearch.common.netty

Examples of org.xbib.elasticsearch.common.netty.ReleaseChannelFutureListener


            ReleasableBytesReference bytes = bStream.ourBytes();
            ChannelBuffer buffer = bytes.toChannelBuffer();
            NettyHeader.writeHeader(buffer, requestId, status, version);
            ChannelFuture future = channel.write(buffer);
            ReleaseChannelFutureListener listener = new ReleaseChannelFutureListener(bytes);
            future.addListener(listener);
            addedReleaseListener = true;
        } finally {
            if (!addedReleaseListener) {
                Releasables.close(bStream.ourBytes());
View Full Code Here


                }
            }

            ChannelFuture future = channel.write(resp);
            if (response.contentThreadSafe() && content instanceof Releasable) {
                future.addListener(new ReleaseChannelFutureListener((Releasable) content));
                addedReleaseListener = true;
            }
            if (close) {
                future.addListener(ChannelFutureListener.CLOSE);
            }
View Full Code Here

TOP

Related Classes of org.xbib.elasticsearch.common.netty.ReleaseChannelFutureListener

Copyright © 2018 www.massapicom. 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.