Examples of UpdateValue


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

    public void simpleTest() throws ExecutionException, InterruptedException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_update_key1");
        UpdateValue uv = new UpdateValue.Builder(loc)
                            .withStoreOption(Option.RETURN_BODY, true)
                            .withUpdate(new UpdatePojo())
                            .build();
       
        UpdateValue.Response resp = client.execute(uv);
View Full Code Here

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

    public void updateAnnotatedPojo() throws ExecutionException, InterruptedException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_update_key2");
        UpdateValue uv = new UpdateValue.Builder(loc)
                            .withStoreOption(Option.RETURN_BODY, true)
                            .withUpdate(new UpdateAnnotatedPojo())
                            .build();
       
        UpdateValue.Response resp = client.execute(uv);
View Full Code Here

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

       
        MyUpdate update = new MyUpdate();
        TypeReference<GenericPojo<Integer>> tr =
            new TypeReference<GenericPojo<Integer>>(){};
       
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(update, tr)
                        .withStoreOption(Option.RETURN_BODY, true)
                        .build();
       
        UpdateValue.Response resp = client.execute(uv);
View Full Code Here

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

       
        MyUpdate update = new MyUpdate();
        TypeReference<GenericPojo<Integer>> tr =
            new TypeReference<GenericPojo<Integer>>(){};
       
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(update, tr)
                        .build();
       
        client.execute(uv);
       
View Full Code Here

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

       
       
        MyUpdate update = new MyUpdate();
       
       
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(update, tr)
                        .build();
       
        client.execute(uv);
       
View Full Code Here

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

        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_ORM_key6");
        ConflictResolverFactory.getInstance().registerConflictResolver(Foo.class, new MyFooResolver());
        MyFooUpdate update = new MyFooUpdate();
       
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(update)
                        .build();
       
        client.execute(uv);
       
View Full Code Here

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

       
        ConflictResolverFactory.getInstance().registerConflictResolver(Foo.class, new MyFooResolver());
        ConverterFactory.getInstance().registerConverterForClass(Foo.class, new MyFooConverter());
        MyFooUpdate update = new MyFooUpdate();
       
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(update)
                        .build();
       
        client.execute(uv);
       
View Full Code Here

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

    public void updateRiakObject() throws ExecutionException, InterruptedException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_ORM_key9");
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(new Update<RiakObject>(){

                                        @Override
                                        public RiakObject apply(RiakObject original)
                                        {
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.