Examples of ProtoBuffClientRequestFormat


Examples of voldemort.client.protocol.pb.ProtoBuffClientRequestFormat

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        byte[] bytes = new byte[] { 0x0, 0x0, 0x0, 0x18, 0x0a, 0x16, 0x0a, 0x05, 0x77, 0x6f, 0x72,
                0x6c, 0x64, 0x12, 0x0d, 0x0a, 0x04, 0x08, 0x00, 0x10, 0x01, 0x10, (byte) 0xf8,
                (byte) 0x9d, (byte) 0xe2, (byte) 0x88, (byte) 0x9b, (byte) 0x24 };
        out.write(bytes);
        ProtoBuffClientRequestFormat requestFormat = new ProtoBuffClientRequestFormat();
        List<Versioned<byte[]>> getResponse = requestFormat.readGetResponse(new DataInputStream(new ByteArrayInputStream(out.toByteArray())));
        out.write(bytes);
        out.write("Some more gibberish".getBytes());
        assertEquals(1, getResponse.size());
    }
View Full Code Here

Examples of voldemort.client.protocol.pb.ProtoBuffClientRequestFormat

            case VOLDEMORT_V2:
                return new VoldemortNativeClientRequestFormat(2);
            case VOLDEMORT_V3:
                return new VoldemortNativeClientRequestFormat(3);
            case PROTOCOL_BUFFERS:
                return new ProtoBuffClientRequestFormat();
            default:
                throw new IllegalArgumentException("Unknown request format type: " + type);
        }
    }
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.