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

Examples of com.basho.riak.client.api.commands.kv.UpdateValue$Response$Builder


  public void deleteAttachment(ERS3Attachment attachment)
      throws MalformedURLException, IOException {
    AWSAuthConnection conn = attachment.awsConnection();
    String bucket = attachment.bucket();
    String key = attachment.key();
    Response response = conn.delete(bucket, key, null);
    if (failed(response)) {
      throw new IOException("Failed to delete '" + bucket + "/" + key
          + "' to S3: Error " + response.connection.getResponseCode()
          + ": " + response.connection.getResponseMessage());
    }
View Full Code Here


          headers.put("Content-Disposition", Arrays
              .asList(new String[] { "attachment; filename="
                  + originalFileName }));
        }

        Response response = conn.putStream(bucket, key,
            attachmentStreamObject, headers);
        if (failed(response)) {
          throw new IOException("Failed to write '" + bucket + "/"
              + key + "' to S3: Error "
              + response.connection.getResponseCode() + ": "
View Full Code Here

    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

    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

       
        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

       
        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

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

        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

       
        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

    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

Related Classes of com.basho.riak.client.api.commands.kv.UpdateValue$Response$Builder

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.