Examples of view()


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

    RiakMap usernameMap = usersMap.getMap(username);
    assertNotNull(usernameMap);

    // logins - counter
    RiakCounter numLoginsCounter = usernameMap.getCounter(numLogins);
    assertEquals((Long) 1L, numLoginsCounter.view());

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

    assertTrue(Arrays.equals(now, lastLoginTimeRegister.view().getValue()));
View Full Code Here

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

        assertTrue(crdtMap.get(mapKey).get(0).isMap());
        assertTrue(crdtMap.get(registerKey).get(0).isRegister());
        assertTrue(crdtMap.get(flagKey).get(0).isFlag());

        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
View Full Code Here

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

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


    // logged-in - flag
    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>();
View Full Code Here

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

        resetAndEmptyBucket(new Namespace(mapBucketType, bucketName));

        RiakMap map = fetchMap(mapBucketType, bucketName, key);

        assertTrue(map.view().isEmpty());

        Location location = new Location(new Namespace(mapBucketType, bucketName), key);
        BinaryValue setValue = BinaryValue.create("value");
        BinaryValue mapKey = BinaryValue.create("set");
       
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);
        assertEquals(1, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        assertTrue(map.view().get(mapKey).get(0).isSet());
        RiakSet set = map.view().get(mapKey).get(0).getAsSet();
        assertTrue(set.view().contains(setValue));
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);
        assertEquals(1, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        assertTrue(map.view().get(mapKey).get(0).isSet());
        RiakSet set = map.view().get(mapKey).get(0).getAsSet();
        assertTrue(set.view().contains(setValue));
View Full Code Here

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

        update.get();

        map = fetchMap(mapBucketType, bucketName, key);
        assertEquals(1, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        assertTrue(map.view().get(mapKey).get(0).isSet());
        RiakSet set = map.view().get(mapKey).get(0).getAsSet();
        assertTrue(set.view().contains(setValue));

View Full Code Here

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

        map = fetchMap(mapBucketType, bucketName, key);
        assertEquals(1, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        assertTrue(map.view().get(mapKey).get(0).isSet());
        RiakSet set = map.view().get(mapKey).get(0).getAsSet();
        assertTrue(set.view().contains(setValue));


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

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

        map = fetchMap(mapBucketType, bucketName, key);
        assertEquals(1, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        assertTrue(map.view().get(mapKey).get(0).isSet());
        RiakSet set = map.view().get(mapKey).get(0).getAsSet();
        assertTrue(set.view().contains(setValue));


        mapKey = BinaryValue.create("counter");
       
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);
        assertEquals(2, map.view().size());
      assertNotNull(map.view().get(mapKey));
      assertEquals(1, map.view().get(mapKey).size());
        assertTrue(map.view().get(mapKey).get(0).isCounter());
        RiakCounter counter = map.view().get(mapKey).get(0).getAsCounter();
        assertEquals((Long) 1L, counter.view());
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.