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

Examples of com.basho.riak.client.api.commands.kv.FetchValue$Response$Init


  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

                new StoreValue.Builder(pojo).withLocation(loc).build();
           
            StoreValue.Response resp = client.execute(sv);
           
           
            FetchValue fv = new FetchValue.Builder(loc).build();
            FetchValue.Response fResp = client.execute(fv);
           
            assertEquals(pojo.value, fResp.getValue(Pojo.class).value);
           
            RiakObject ro = fResp.getValue(RiakObject.class);
View Full Code Here

    private void notFound(String bucketType) throws ExecutionException, InterruptedException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(bucketType, bucketName.toString());
        Location loc = new Location(ns, "test_fetch_key2");
        FetchValue fv = new FetchValue.Builder(loc).build();
        FetchValue.Response fResp = client.execute(fv);
       
        assertFalse(fResp.hasValues());
        assertTrue(fResp.isNotFound());
        assertNull(fResp.getValue(Pojo.class));
View Full Code Here

       
        resetAndEmptyBucket(bucketName);
       
        client.execute(sv);
       
        FetchValue fv = new FetchValue.Builder(loc)
                            .withOption(Option.DELETED_VCLOCK, false)
                            .build();
       
        FetchValue.Response fResp = client.execute(fv);
       
View Full Code Here

        client.execute(sv);
       
        ConflictResolverFactory.getInstance()
            .registerConflictResolver(Pojo.class, new MyResolver());
       
        FetchValue fv = new FetchValue.Builder(loc).build();
       
        FetchValue.Response fResp = client.execute(fv);
        
        assertEquals(pojo.value, fResp.getValue(Pojo.class).value);
View Full Code Here

                        .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);
       
        RiakAnnotatedPojo rap = resp.getValue(RiakAnnotatedPojo.class);
       
        assertNotNull(rap.bucketName);
View Full Code Here

        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);
       
        RiakAnnotatedPojo rap = resp.getValue(RiakAnnotatedPojo.class);
       
        assertNotNull(rap.emailIndx);
View Full Code Here

                .withLocation(loc)
                .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

       
        Pojo pojo2 = resp.getValue(Pojo.class);
       
        assertEquals(pojo.value, pojo2.value);
       
        FetchValue fv = new FetchValue.Builder(loc)
                            .build();
       
        FetchValue.Response fResp = client.execute(fv);
       
        assertEquals(pojo.value, fResp.getValue(Pojo.class).value);
View Full Code Here

TOP

Related Classes of com.basho.riak.client.api.commands.kv.FetchValue$Response$Init

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.