Examples of RiakDatatype


Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

            new CoreFutureAdapter<FetchSet.Response, Location, DtFetchOperation.Response, Location>(coreFuture) {

            @Override
            protected FetchSet.Response convertResponse(DtFetchOperation.Response coreResponse)
            {
                RiakDatatype element = coreResponse.getCrdtElement();
               
                Context context = null;
                if (coreResponse.hasContext())
                {
                    context = new Context(coreResponse.getContext());
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

                protected Response convertResponse(DtUpdateOperation.Response coreResponse)
                {
                    RiakSet set = null;
                    if (coreResponse.hasCrdtElement())
                    {
                        RiakDatatype element = coreResponse.getCrdtElement();
                        set = element.getAsSet();
                    }
                    BinaryValue returnedKey = coreResponse.hasGeneratedKey()
                        ? coreResponse.getGeneratedKey()
                        : null;
                    Context returnedCtx = null;
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

            new CoreFutureAdapter<FetchMap.Response, Location, DtFetchOperation.Response, Location>(coreFuture) {

            @Override
            protected FetchMap.Response convertResponse(DtFetchOperation.Response coreResponse)
            {
                RiakDatatype element = coreResponse.getCrdtElement();
               
                Context context = null;
                if (coreResponse.hasContext())
                {
                    context = new Context(coreResponse.getContext());
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

                protected Response convertResponse(DtUpdateOperation.Response coreResponse)
                {
                    RiakCounter counter = null;
                    if (coreResponse.hasCrdtElement())
                    {
                        RiakDatatype element = coreResponse.getCrdtElement();
                        counter = element.getAsCounter();
                    }
                    BinaryValue returnedKey = coreResponse.hasGeneratedKey()
                        ? coreResponse.getGeneratedKey()
                        : null;
                   
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

        }

        RiakDtPB.DtFetchResp response = rawResponse.iterator().next();

        CrdtResponseConverter converter = new CrdtResponseConverter();
        RiakDatatype element = converter.convert(response);

        Response.Builder responseBuilder = new Response.Builder()
            .withCrdtElement(element);

        if (response.hasContext())
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

                protected Response convertResponse(DtUpdateOperation.Response coreResponse)
                {
                    RiakMap map = null;
                    if (coreResponse.hasCrdtElement())
                    {
                        RiakDatatype element = coreResponse.getCrdtElement();
                        map = element.getAsMap();
                    }
                    BinaryValue returnedKey = coreResponse.hasGeneratedKey()
                        ? coreResponse.getGeneratedKey()
                        : null;
                   
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

            new CoreFutureAdapter<FetchCounter.Response, Location, DtFetchOperation.Response, Location>(coreFuture) {

            @Override
            protected FetchCounter.Response convertResponse(DtFetchOperation.Response coreResponse)
            {
                RiakDatatype element = coreResponse.getCrdtElement();
               
                Context context = null;
                if (coreResponse.hasContext())
                {
                    context = new Context(coreResponse.getContext());
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

            .setCounterValue(1)
            .build();

        CrdtResponseConverter converter = new CrdtResponseConverter();

        RiakDatatype element = converter.convert(resp);

        assertTrue(element.isCounter());
        assertEquals((Long) 1L, element.getAsCounter().view());

    }
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

            .addAllSetValue(values)
            .build();

        CrdtResponseConverter converter = new CrdtResponseConverter();

        RiakDatatype element = converter.convert(resp);

        assertTrue(element.isSet());
        assertEquals(wrappedValues, element.getAsSet().view());

    }
View Full Code Here

Examples of com.basho.riak.client.core.query.crdt.types.RiakDatatype

                .setFlagValue(flagValue))
            .build();

        CrdtResponseConverter converter = new CrdtResponseConverter();

        RiakDatatype element = converter.convert(resp);

        assertTrue(element.isMap());

        RiakMap crdtMap = element.getAsMap();

        assertTrue(crdtMap.get(counterKey).get(0).isCounter());
        assertTrue(crdtMap.get(setKey).get(0).isSet());
        assertTrue(crdtMap.get(mapKey).get(0).isMap());
        assertTrue(crdtMap.get(registerKey).get(0).isRegister());
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.