Package com.basho.riak.client.core.operations

Examples of com.basho.riak.client.core.operations.DtFetchOperation


        ArgumentCaptor<DtFetchOperation> captor =
            ArgumentCaptor.forClass(DtFetchOperation.class);
        verify(mockCluster).execute(captor.capture());

        DtFetchOperation operation = captor.getValue();
        RiakDtPB.DtFetchReq.Builder builder =
            (RiakDtPB.DtFetchReq.Builder) Whitebox.getInternalState(operation, "reqBuilder");

        assertEquals("type", builder.getType().toStringUtf8());
        assertEquals("bucket", builder.getBucket().toStringUtf8());
View Full Code Here


    private RiakCounter fetchCounter(BinaryValue type, BinaryValue bucket, BinaryValue key)
        throws ExecutionException, InterruptedException
    {
        Location location = new Location(new Namespace(type, bucket), key);
        DtFetchOperation fetch = new DtFetchOperation.Builder(location).build();
        cluster.execute(fetch);
        DtFetchOperation.Response response = fetch.get();
        RiakDatatype element = response.getCrdtElement();

        assertNotNull(element);
        assertTrue(element.isCounter());
View Full Code Here

    private RiakSet fetchSet(BinaryValue type, BinaryValue bucket, BinaryValue key)
        throws ExecutionException, InterruptedException
    {
        Location location = new Location(new Namespace(type, bucket), key);
        DtFetchOperation fetch = new DtFetchOperation.Builder(location).build();

        cluster.execute(fetch);
        DtFetchOperation.Response response = fetch.get();
        RiakDatatype element = response.getCrdtElement();

        assertNotNull(element);
        assertTrue(element.isSet());
View Full Code Here

    private RiakMap fetchMap(BinaryValue type, BinaryValue bucket, BinaryValue key)
        throws ExecutionException, InterruptedException
    {
        Location location = new Location(new Namespace(type, bucket), key);
        DtFetchOperation fetch = new DtFetchOperation.Builder(location).build();

        cluster.execute(fetch);
        DtFetchOperation.Response response = fetch.get();
        RiakDatatype element = response.getCrdtElement();

        assertNotNull(element);
        assertTrue(element.isMap());
View Full Code Here

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

       
        DtFetchOperation fetch = new DtFetchOperation.Builder(location)
            .build();
        cluster.execute(fetch);

        // users
        RiakDatatype element = fetch.get().getCrdtElement();
        assertNotNull(element);
        assertTrue(element.isMap());
        RiakMap usersMap = element.getAsMap();

        // username
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.operations.DtFetchOperation

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.