Examples of usingNamespace()


Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

            client.start();

            client.create().forPath("/one");
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/one", false));

            client.usingNamespace("space").create().forPath("/one");
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/space", false));

            client.usingNamespace("name").create().forPath("/one");
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/name", false));
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/name/one", false));
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/one", false));

            client.usingNamespace("space").create().forPath("/one");
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/space", false));

            client.usingNamespace("name").create().forPath("/one");
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/name", false));
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/name/one", false));
        }
        finally
        {
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

            }
            catch ( IllegalArgumentException expected )
            {
            }

            Assert.assertNotNull(client.usingNamespace("one").checkExists().forPath("/"));
            try
            {
                client.usingNamespace("one").checkExists().forPath("");
                Assert.fail("IllegalArgumentException expected");
            }
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

            }

            Assert.assertNotNull(client.usingNamespace("one").checkExists().forPath("/"));
            try
            {
                client.usingNamespace("one").checkExists().forPath("");
                Assert.fail("IllegalArgumentException expected");
            }
            catch ( IllegalArgumentException expected )
            {
            }
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

            String      actualPath = client.create().forPath("/test");
            Assert.assertEquals(actualPath, "/test");
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/" + namespace + "/test", false));
            Assert.assertNull(client.getZookeeperClient().getZooKeeper().exists("/test", false));

            actualPath = client.usingNamespace(null).create().forPath("/non");
            Assert.assertEquals(actualPath, "/non");
            Assert.assertNotNull(client.getZookeeperClient().getZooKeeper().exists("/non", false));

            client.create().forPath("/test/child", "hey".getBytes());
            byte[]      bytes = client.getData().forPath("/test/child");
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

            client.create().forPath("/test/child", "hey".getBytes());
            byte[]      bytes = client.getData().forPath("/test/child");
            Assert.assertEquals(bytes, "hey".getBytes());

            bytes = client.usingNamespace(null).getData().forPath("/" + namespace + "/test/child");
            Assert.assertEquals(bytes, "hey".getBytes());
        }
        finally
        {
            client.close();
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

        CuratorFramework    client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
        try
        {
            client.start();

            Assert.assertEquals(client.usingNamespace("foo"), client.usingNamespace("foo"));
            Assert.assertNotSame(client.usingNamespace("foo"), client.usingNamespace("bar"));
        }
        finally
        {
            Closeables.closeQuietly(client);
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

        CuratorFramework    client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
        try
        {
            client.start();

            Assert.assertEquals(client.usingNamespace("foo"), client.usingNamespace("foo"));
            Assert.assertNotSame(client.usingNamespace("foo"), client.usingNamespace("bar"));
        }
        finally
        {
            Closeables.closeQuietly(client);
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

        try
        {
            client.start();

            Assert.assertEquals(client.usingNamespace("foo"), client.usingNamespace("foo"));
            Assert.assertNotSame(client.usingNamespace("foo"), client.usingNamespace("bar"));
        }
        finally
        {
            Closeables.closeQuietly(client);
        }
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.usingNamespace()

        try
        {
            client.start();

            Assert.assertEquals(client.usingNamespace("foo"), client.usingNamespace("foo"));
            Assert.assertNotSame(client.usingNamespace("foo"), client.usingNamespace("bar"));
        }
        finally
        {
            Closeables.closeQuietly(client);
        }
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.