Examples of view()


Examples of com.basho.riak.client.core.query.crdt.types.RiakMap.view()

        cluster.execute(update);
        update.get();

        map = fetchMap(mapBucketType, bucketName, key);
        assertEquals(4, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        RiakRegister register = map.view().get(mapKey).get(0).getAsRegister();
        assertEquals(mapKey, register.getValue());

View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakMap.view()

        update.get();

        map = fetchMap(mapBucketType, bucketName, key);
        assertEquals(4, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        RiakRegister register = map.view().get(mapKey).get(0).getAsRegister();
        assertEquals(mapKey, register.getValue());


        mapKey = BinaryValue.create("map");
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakMap.view()

        map = fetchMap(mapBucketType, bucketName, key);
        assertEquals(4, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        RiakRegister register = map.view().get(mapKey).get(0).getAsRegister();
        assertEquals(mapKey, register.getValue());


        mapKey = BinaryValue.create("map");
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakMap.view()

        cluster.execute(update);
        update.get();

        map = fetchMap(mapBucketType, bucketName, key);
        Map<BinaryValue, List<RiakDatatype>> mapView = map.view();
        assertEquals(5, mapView.size());

        assertTrue(mapView.containsKey(mapKey));
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakMap.view()

        map = fetchMap(mapBucketType, bucketName, key);
        Map<BinaryValue, List<RiakDatatype>> mapView = map.view();
        assertEquals(5, mapView.size());

        assertTrue(mapView.containsKey(mapKey));
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        assertTrue(mapView.get(mapKey).get(0).isMap());
        RiakMap nestedMap = mapView.get(mapKey).get(0).getAsMap();
        Map<BinaryValue, List<RiakDatatype>> nestedMapView = nestedMap.view();
        assertEquals(1, nestedMapView.size());
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakRegister.view()

    assertEquals((Long) 1L, numLoginsCounter.view());

    // last-login - register
    RiakRegister lastLoginTimeRegister = usernameMap.getRegister(lastLoginTime);

    assertTrue(Arrays.equals(now, lastLoginTimeRegister.view().getValue()));


    // logged-in - flag
    RiakFlag loggedInFlag = usernameMap.getFlag(loggedIn);
    assertEquals((Boolean) true, loggedInFlag.view());
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakSet.view()

    RiakFlag loggedInFlag = usernameMap.getFlag(loggedIn);
    assertEquals((Boolean) true, loggedInFlag.view());

    // cart - asSet
    RiakSet shoppingCartSet = usernameMap.getSet(shoppingCart);
    Set<BinaryValue> setView = shoppingCartSet.view();
    Set<BinaryValue> expectedSet = new HashSet<BinaryValue>();
    for (int i = 0; i < 10; ++i)
    {
      ByteBuffer b = ByteBuffer.allocate(4);
      b.putInt(i);
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakSet.view()

        RiakCounter riakCounter = crdtMap.get(counterKey).get(0).getAsCounter();
        assertEquals((Long) counterValue, riakCounter.view());

        RiakSet crdtSet = crdtMap.get(setKey).get(0).getAsSet();
        assertEquals(wrappedSetValues, crdtSet.view());

        // the asMap doesn't have any values

        RiakRegister crdtRegister = crdtMap.get(registerKey).get(0).getAsRegister();
        assertEquals(registerValue, crdtRegister.getValue());
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakSet.view()

        BinaryValue key = BinaryValue.create("key");

        resetAndEmptyBucket(new Namespace(setBucketType, bucketName));

        RiakSet set = fetchSet(setBucketType, bucketName, key);
        assertTrue(set.view().isEmpty());

        Set<BinaryValue> testValues = new HashSet<BinaryValue>(iterations);
        Location location = new Location(new Namespace(setBucketType, bucketName), key);
        BinaryValue ctx = null;
        for (int i = 0; i < iterations; ++i)
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakSet.view()

            DtUpdateOperation.Response resp = update.get();
            ctx = resp.getContext();
            set = resp.getCrdtElement().getAsSet();
        }

        assertEquals(iterations, set.view().size());
        assertEquals(testValues, set.view());

       
        for (BinaryValue setElement : testValues)
        {
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.