Package com.basho.riak.client.api

Examples of com.basho.riak.client.api.RiakClient.execute()


        UpdateValue uv = new UpdateValue.Builder(loc)
                            .withStoreOption(Option.RETURN_BODY, true)
                            .withUpdate(new UpdatePojo())
                            .build();
       
        UpdateValue.Response resp = client.execute(uv);
        Pojo pojo = resp.getValue(Pojo.class);
        assertEquals(1, pojo.value);
       
        resp = client.execute(uv);
        pojo = resp.getValue(Pojo.class);
View Full Code Here


       
        UpdateValue.Response resp = client.execute(uv);
        Pojo pojo = resp.getValue(Pojo.class);
        assertEquals(1, pojo.value);
       
        resp = client.execute(uv);
        pojo = resp.getValue(Pojo.class);
       
        assertEquals(2, pojo.value);
       
    }
View Full Code Here

        UpdateValue uv = new UpdateValue.Builder(loc)
                            .withStoreOption(Option.RETURN_BODY, true)
                            .withUpdate(new UpdateAnnotatedPojo())
                            .build();
       
        UpdateValue.Response resp = client.execute(uv);
        RiakAnnotatedPojo rap = resp.getValue(RiakAnnotatedPojo.class);
       
        assertNotNull(rap.bucketName);
        assertEquals(ns.getBucketNameAsString(), rap.bucketName);
        assertNotNull(rap.key);
View Full Code Here

            new StoreValue.Builder(gpf)
                .withLocation(loc)
                .withOption(Option.RETURN_BODY, true)
                .build();
       
        StoreValue.Response resp = client.execute(sv);
       
       
        TypeReference<GenericPojo<Foo>> tr =
            new TypeReference<GenericPojo<Foo>>(){};
        GenericPojo<Foo> gpf2 = resp.getValue(tr);
View Full Code Here

        StoreValue sv =
            new StoreValue.Builder(gpf)
                .withLocation(loc)
                .build();
       
        client.execute(sv);
           
        FetchValue fv = new FetchValue.Builder(loc).build();
        FetchValue.Response resp = client.execute(fv);
       
        TypeReference<GenericPojo<Foo>> tr =
View Full Code Here

                .build();
       
        client.execute(sv);
           
        FetchValue fv = new FetchValue.Builder(loc).build();
        FetchValue.Response resp = client.execute(fv);
       
        TypeReference<GenericPojo<Foo>> tr =
            new TypeReference<GenericPojo<Foo>>(){};
        GenericPojo<Foo> gpf2 = resp.getValue(tr);
       
View Full Code Here

        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(update, tr)
                        .withStoreOption(Option.RETURN_BODY, true)
                        .build();
       
        UpdateValue.Response resp = client.execute(uv);
       
        GenericPojo<Integer> gpi = resp.getValue(tr);
       
        assertNotNull(gpi);
        assertNotNull(gpi.value);
View Full Code Here

        mapper.registerModule(new RiakJacksonModule());
        String json = mapper.writeValueAsString(gpi);
        RiakObject ro = resp.getValue(RiakObject.class);
        assertEquals(json, ro.getValue().toString());
       
        resp = client.execute(uv);
        gpi = resp.getValue(tr);
        assertNotNull(gpi);
        assertNotNull(gpi.value);
        assertEquals(2, gpi.value.intValue());
    }
View Full Code Here

       
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(update, tr)
                        .build();
       
        client.execute(uv);
       
        // Create a sibling
        GenericPojo<Integer> gpi = update.apply(null);
        StoreValue sv =
            new StoreValue.Builder(gpi)
View Full Code Here

        StoreValue sv =
            new StoreValue.Builder(gpi)
                .withLocation(loc)
                .build();
       
        client.execute(sv);
       
        ConflictResolverFactory.getInstance().registerConflictResolver(tr, new MyResolver());
       
        uv = new UpdateValue.Builder(loc)
                        .withUpdate(update, tr)
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.