Examples of RiakDatatype


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

                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

        }

        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

        for (RiakDtPB.MapEntry entry : mapEntries)
        {

            RiakDtPB.MapField field = entry.getField();

            RiakDatatype element;
            switch (field.getType())
            {
                case COUNTER:
                    element = new RiakCounter(entry.getCounterValue());
                    break;
View Full Code Here

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

    }

    public RiakDatatype convert(RiakDtPB.DtUpdateResp response)
    {

        RiakDatatype element = null;

        if (response.hasCounterValue())
        {
            element = new RiakCounter(response.getCounterValue());
        }
View Full Code Here

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

    }

    public RiakDatatype convert(RiakDtPB.DtFetchResp response)
    {
        RiakDatatype element;
        switch (response.getType())
        {
            case COUNTER:
                element = new RiakCounter(response.getValue().getCounterValue());
                break;
View Full Code Here

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

            throw new IllegalStateException("Expecting exactly one response, instead received " + rawResponse.size());
        }

        RiakDtPB.DtUpdateResp response = rawResponse.iterator().next();
        CrdtResponseConverter converter = new CrdtResponseConverter();
        RiakDatatype element = converter.convert(response);
       
        Response.Builder responseBuilder =
            new Response.Builder().withCrdtElement(element);

        if (response.hasKey())
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
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.