Package com.basho.riak.client.api

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


       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
       
        IntIndexQuery iiq =
            new IntIndexQuery.Builder(ns, "test_index", 123456L).withKeyAndIndex(true).build();
        IntIndexQuery.Response iResp = client.execute(iiq);
       
        assertTrue(iResp.hasEntries());
        assertEquals(2, iResp.getEntries().size());
       
        boolean found = false;
View Full Code Here


        IntIndexQuery iiq =
            new IntIndexQuery.Builder(ns, "test_index", Long.MIN_VALUE, Long.MAX_VALUE)
                .withKeyAndIndex(true)
                .build();
       
        IntIndexQuery.Response iResp = client.execute(iiq);
        assertTrue(iResp.hasEntries());
        assertEquals(2, iResp.getEntries().size());
       
        boolean found = false;
        for (IntIndexQuery.Response.Entry e : iResp.getEntries())
View Full Code Here

        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
       
        BigIntIndexQuery iiq =
            new BigIntIndexQuery.Builder(ns, "test_index", new BigInteger("91234567890123456789012345678901234567890"))
                .withKeyAndIndex(true).build();
        BigIntIndexQuery.Response iResp = client.execute(iiq);
       
        assertTrue(iResp.hasEntries());
        assertEquals(2, iResp.getEntries().size());
       
        boolean found = false;
View Full Code Here

                                         new BigInteger("91234567890123456789012345678901234567890"),
                                         new BigInteger("91234567890123456789012345678901234567898"))
                .withKeyAndIndex(true)
                .build();
       
        BigIntIndexQuery.Response iResp = client.execute(iiq);
        assertTrue(iResp.hasEntries());
        assertEquals(2, iResp.getEntries().size());
       
        boolean found = false;
        for (BigIntIndexQuery.Response.Entry e : iResp.getEntries())
View Full Code Here

       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
       
        RawIndexQuery biq  =
            new RawIndexQuery.Builder(ns, "test_index", Type._BIN, indexKey).withKeyAndIndex(true).build();
        RawIndexQuery.Response iResp = client.execute(biq);
       
        assertTrue(iResp.hasEntries());
        RawIndexQuery.Response.Entry first = iResp.getEntries().iterator().next();
        assertEquals(ip.key, first.getRiakObjectLocation().getKey().toString());
        assertArrayEquals(ip.indexKey, first.getIndexKey().getValue());
View Full Code Here

       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
       
        BinIndexQuery biq  =
            new BinIndexQuery.Builder(ns, "test_index", "index_test_index_key").withKeyAndIndex(true).build();
        BinIndexQuery.Response iResp = client.execute(biq);

        assertTrue(iResp.hasEntries());
        assertEquals(2, iResp.getEntries().size());
       
        boolean found = false;
View Full Code Here

        assertTrue(svFuture.isSuccess());
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        BinIndexQuery biq  =
            new BinIndexQuery.Builder(ns, "test_index", "index_test_index_key0", "index_test_index_key9").withKeyAndIndex(true).build();
        BinIndexQuery.Response iResp = client.execute(biq);
       
        assertTrue(iResp.hasEntries());
        assertEquals(2, iResp.getEntries().size());
       
        boolean found = false;
View Full Code Here

            Pojo pojo = new Pojo();
            pojo.value = "test value";
            StoreValue sv =
                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);
           
View Full Code Here

           
            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);
            assertNotNull(ro.getValue());
View Full Code Here

    {
        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));
        RiakObject ro = fResp.getValue(RiakObject.class);
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.