Package com.basho.riak.client.api.commands.kv

Examples of com.basho.riak.client.api.commands.kv.StoreValue


       
        RiakObject ro = new RiakObject()
                        .setValue(BinaryValue.create(jsonValue))
                        .setContentType("application/json");
       
        StoreValue sv = new StoreValue.Builder(ro).withLocation(loc).build();
        client.execute(sv);
       
        FetchValue fv = new FetchValue.Builder(loc).build();
        FetchValue.Response resp = client.execute(fv);
       
View Full Code Here


                        .setContentType("application/json");
       
        ro.getIndexes().getIndex(StringBinIndex.named("email")).add("roach@basho.com");
        ro.getIndexes().getIndex(LongIntIndex.named("user_id")).add(1L);
       
        StoreValue sv = new StoreValue.Builder(ro).withLocation(loc).build();
        client.execute(sv);
       
        FetchValue fv = new FetchValue.Builder(loc).build();
        FetchValue.Response resp = client.execute(fv);
       
View Full Code Here

        for (int i = 0; i < 200; i++)
        {
            Location loc = new Location(ns, keyPrefix + i);
            RiakObject ro = new RiakObject().setContentType("text/plain")
                .setValue(BinaryValue.create(Integer.toString(i)));
            StoreValue sv = new StoreValue.Builder(ro).withLocation(loc).build();
            RiakFuture<StoreValue.Response, Location> future = client.executeAsync(sv);
            future.await();
            assertTrue(future.isSuccess());
        }
    }
View Full Code Here

        List<Foo> fooList = new ArrayList<Foo>();
        fooList.add(new Foo("Foo in list value"));
        gpf.value = new Foo("Foo in gp value");
        gpf.list = fooList;
       
        StoreValue sv =
            new StoreValue.Builder(gpf)
                .withLocation(loc)
                .withOption(Option.RETURN_BODY, true)
                .build();
       
View Full Code Here

        List<Foo> fooList = new ArrayList<Foo>();
        fooList.add(new Foo("Foo in list value"));
        gpf.value = new Foo("Foo in gp value");
        gpf.list = fooList;
       
        StoreValue sv =
            new StoreValue.Builder(gpf)
                .withLocation(loc)
                .build();
       
        client.execute(sv);
View Full Code Here

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

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

       
        client.execute(uv);
       
        // Create a sibling
        Foo f = update.apply(null);
        StoreValue sv =
            new StoreValue.Builder(f)
                .withLocation(loc)
                .build();
       
        client.execute(sv);
View Full Code Here

       
        client.execute(uv);
       
        // Create a sibling
        Foo f = update.apply(null);
        StoreValue sv =
            new StoreValue.Builder(f)
                .withLocation(loc)
                .build();
       
        client.execute(sv);
View Full Code Here

        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_store_key");
        Pojo pojo = new Pojo();
        pojo.value = "test store value";
        StoreValue sv =
            new StoreValue.Builder(pojo).withLocation(loc)
                .withOption(Option.RETURN_BODY, true)
                .build();
       
        StoreValue.Response resp = client.execute(sv);
View Full Code Here

TOP

Related Classes of com.basho.riak.client.api.commands.kv.StoreValue

Copyright © 2018 www.massapicom. 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.