Examples of NetworkReceive


Examples of org.apache.kafka.common.network.NetworkReceive

        int size = respHeader.sizeOf() + resp.sizeOf();
        ByteBuffer buffer = ByteBuffer.allocate(size);
        respHeader.writeTo(buffer);
        resp.writeTo(buffer);
        buffer.flip();
        selector.completeReceive(new NetworkReceive(node.id(), buffer));
        List<ClientResponse> responses = client.poll(new ArrayList<ClientRequest>(), 1, time.milliseconds());
        assertEquals(1, responses.size());
        ClientResponse response = responses.get(0);
        assertTrue("Should have a response body.", response.hasResponse());
        assertEquals("Should be correlated to the original request", request, response.request());
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.