Examples of BytesPushThroughSerializer


Examples of org.I0Itec.zkclient.serialize.BytesPushThroughSerializer

    public ZkTestSystem _zk = ZkTestSystem.getInstance();

    @Test
    public void testBytes() throws Exception {
        ZkClient zkClient = ZkTestSystem.createZkClient(_zk.getZkServerAddress());
        zkClient.setZkSerializer(new BytesPushThroughSerializer());
        byte[] bytes = new byte[100];
        new Random().nextBytes(bytes);
        zkClient.createPersistent("/a", bytes);
        byte[] readBytes = zkClient.readData("/a");
        assertArrayEquals(bytes, readBytes);
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.BytesPushThroughSerializer

        TimeUnit.MILLISECONDS);
    // server.start();
    client.waitUntilConnected();

    Thread.sleep(1000);
    client.setZkSerializer(new BytesPushThroughSerializer());
    client.create("/test", new byte[0], CreateMode.EPHEMERAL);
    Thread.sleep(1000);
  }
View Full Code Here

Examples of org.I0Itec.zkclient.serialize.BytesPushThroughSerializer

    @Rule
    public ZkTestSystem _zk = ZkTestSystem.getInstance();

    @Test
    public void testBytes() throws Exception {
        ZkClient zkClient = new ZkClient(_zk.getZkServerAddress(), 2000, 2000, new BytesPushThroughSerializer());
        byte[] bytes = new byte[100];
        new Random().nextBytes(bytes);
        zkClient.createPersistent("/a", bytes);
        byte[] readBytes = zkClient.readData("/a");
        assertArrayEquals(bytes, readBytes);
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.