Package org.elasticsearch.common.netty.channel

Examples of org.elasticsearch.common.netty.channel.ChannelFutureListener


                    writeBuffer.writeShort(0);
                }
                if (keyLength > 0) {
                    writeBuffer.writeBytes(request.getUriBytes());
                }
                ChannelFutureListener releaseContentListener = null;
                if (dataLength > 0) {
                    if (response instanceof XContentRestResponse) {
                        // if its a builder based response, and it was created with a CachedStreamOutput, we can release it
                        // after we write the response, and no need to do an extra copy because its not thread safe
                        XContentBuilder builder = ((XContentRestResponse) response).builder();
View Full Code Here


        if (opaque != null) {
            resp.addHeader("X-Opaque-Id", opaque);
        }

        // Convert the response content to a ChannelBuffer.
        ChannelFutureListener releaseContentListener = null;
        ChannelBuffer buf;
        try {
            if (response instanceof XContentRestResponse) {
                // if its a builder based response, and it was created with a CachedStreamOutput, we can release it
                // after we write the response, and no need to do an extra copy because its not thread safe
View Full Code Here

                    writeBuffer.writeShort(0);
                }
                if (keyLength > 0) {
                    writeBuffer.writeBytes(getMemcachedRequest().getUriBytes());
                }
                ChannelFutureListener releaseContentListener = null;
                if (dataLength > 0) {
                    // Convert the response content to a ChannelBuffer.
                    ChannelBuffer buf;
                    if (response.contentThreadSafe()) {
                            buf = ChannelBuffers.wrappedBuffer(response.content().toBytes(), response.content().arrayOffset(), response.content().length());
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.netty.channel.ChannelFutureListener

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.