Examples of CuratorTempFramework


Examples of org.apache.curator.framework.CuratorTempFramework

public class TestTempFramework extends BaseClassForTests
{
    @Test
    public void testBasic() throws Exception
    {
        CuratorTempFramework        client = CuratorFrameworkFactory.builder().connectString(server.getConnectString()).retryPolicy(new RetryOneTime(1)).buildTemp();
        try
        {
            client.inTransaction().create().forPath("/foo", "data".getBytes()).and().commit();

            byte[] bytes = client.getData().forPath("/foo");
            Assert.assertEquals(bytes, "data".getBytes());
        }
        finally
        {
            Closeables.closeQuietly(client);
View Full Code Here

Examples of org.apache.curator.framework.CuratorTempFramework

public class TestTempFramework extends BaseClassForTests
{
    @Test
    public void testBasic() throws Exception
    {
        CuratorTempFramework        client = CuratorFrameworkFactory.builder().connectString(server.getConnectString()).retryPolicy(new RetryOneTime(1)).buildTemp();
        try
        {
            client.inTransaction().create().forPath("/foo", "data".getBytes()).and().commit();

            byte[] bytes = client.getData().forPath("/foo");
            Assert.assertEquals(bytes, "data".getBytes());
        }
        finally
        {
            CloseableUtils.closeQuietly(client);
View Full Code Here

Examples of org.apache.curator.framework.CuratorTempFramework

public class TestTempFramework extends BaseClassForTests
{
    @Test
    public void testBasic() throws Exception
    {
        CuratorTempFramework        client = CuratorFrameworkFactory.builder().connectString(server.getConnectString()).retryPolicy(new RetryOneTime(1)).buildTemp();
        try
        {
            client.inTransaction().create().forPath("/foo", "data".getBytes()).and().commit();

            byte[] bytes = client.getData().forPath("/foo");
            Assert.assertEquals(bytes, "data".getBytes());
        }
        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.