Examples of usingNamespace()


Examples of com.netflix.curator.framework.CuratorFramework.usingNamespace()

    private static CuratorFramework newCurator(ZooKeeperConfiguration config) {
        CuratorFramework curator = CuratorFrameworkFactory.newClient(config.getConnectString(), config.getRetry());
        curator.start();

        return curator.usingNamespace(config.getNamespace());
    }
}
View Full Code Here

Examples of com.netflix.curator.framework.CuratorFramework.usingNamespace()

    private static CuratorFramework newCurator(ZooKeeperConfiguration config) {
        CuratorFramework curator = CuratorFrameworkFactory.newClient(config.getConnectString(), config.getRetry());
        curator.start();

        return curator.usingNamespace(config.getNamespace());
    }
}
View Full Code Here

Examples of com.netflix.curator.framework.CuratorFramework.usingNamespace()

    private static CuratorFramework newCurator(ZooKeeperConfiguration config) {
        CuratorFramework curator = CuratorFrameworkFactory.newClient(config.getConnectString(), config.getRetry());
        curator.start();

        return curator.usingNamespace(config.getNamespace());
    }
}
View Full Code Here

Examples of com.netflix.curator.framework.CuratorFramework.usingNamespace()

    }

    private static CuratorFramework newCurator(ZooKeeperConfiguration config, Environment env) {
        CuratorFramework curator = CuratorFrameworkFactory.newClient(config.getConnectString(), config.getRetry());
        if (!Strings.isNullOrEmpty(config.getNamespace())) {
            curator = curator.usingNamespace(config.getNamespace());
        }

        env.manage(new ManagedCuratorFramework(curator));
        return curator;
    }
View Full Code Here

Examples of com.netflix.curator.framework.CuratorFramework.usingNamespace()

    }

    private static CuratorFramework newCurator(ZooKeeperConfiguration config, Environment env) {
        CuratorFramework curator = CuratorFrameworkFactory.newClient(config.getConnectString(), config.getRetry());
        if (!Strings.isNullOrEmpty(config.getNamespace())) {
            curator = curator.usingNamespace(config.getNamespace());
        }

        env.manage(new ManagedCuratorFramework(curator));
        return curator;
    }
View Full Code Here

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

                    .delete().forPath("/foo/bar")
                .and()
                    .commit();

            Assert.assertTrue(client.checkExists().forPath("/foo") != null);
            Assert.assertTrue(client.usingNamespace(null).checkExists().forPath("/galt/foo") != null);
            Assert.assertEquals(client.getData().forPath("/foo"), "two".getBytes());
            Assert.assertTrue(client.checkExists().forPath("/foo/bar") == null);

            CuratorTransactionResult    ephemeralResult = Iterables.find(results, CuratorTransactionResult.ofTypeAndPath(OperationType.CREATE, "/test-"));
            Assert.assertNotNull(ephemeralResult);
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.assertSame(client.usingNamespace("foo"), client.usingNamespace("foo"));
            Assert.assertNotSame(client.usingNamespace("foo"), client.usingNamespace("bar"));
        }
        finally
        {
            CloseableUtils.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.assertSame(client.usingNamespace("foo"), client.usingNamespace("foo"));
            Assert.assertNotSame(client.usingNamespace("foo"), client.usingNamespace("bar"));
        }
        finally
        {
            CloseableUtils.closeQuietly(client);
View Full Code Here

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

        try
        {
            client.start();

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

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

        try
        {
            client.start();

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