Package com.basho.riak.pbc

Examples of com.basho.riak.pbc.RequestMeta


     * @param storeMeta
     *            a {@link StoreMeta} for the store operation.
     * @return a {@link RequestMeta} populated from the storeMeta's values.
     */
    static RequestMeta convert(StoreMeta storeMeta, IRiakObject riakObject) {
        RequestMeta requestMeta = new RequestMeta();
        if (storeMeta.hasW()) {
            requestMeta.w(storeMeta.getW().getIntValue());
        }

        if (storeMeta.hasDw()) {
            requestMeta.dw(storeMeta.getDw().getIntValue());
        }

        if (storeMeta.hasReturnBody()) {
            requestMeta.returnBody(storeMeta.getReturnBody());
        }

        if (storeMeta.hasReturnHead()) {
            requestMeta.returnHead(storeMeta.getReturnHead());
        }
       
        if (riakObject != null) {
            String contentType = riakObject.getContentType();
            if (contentType != null) {
                requestMeta.contentType(contentType);
            }
        }

        if (storeMeta.hasPw()) {
            requestMeta.pw( storeMeta.getPw().getIntValue());
        }

        if (storeMeta.hasIfNoneMatch()) {
            requestMeta.ifNoneMatch(storeMeta.getIfNoneMatch());
        }

        if (storeMeta.hasIfNotModified()) {
            requestMeta.ifNotModified(storeMeta.getIfNotModified());
        }

        if (storeMeta.hasAsis()) {
            requestMeta.asis(storeMeta.getAsis());
        }
       
        return requestMeta;
    }
View Full Code Here


     * @see
     * com.basho.riak.client.raw.RawClient#mapReduce(com.basho.riak.client.query
     * .MapReduceSpec)
     */
    public MapReduceResult mapReduce(MapReduceSpec spec) throws IOException, MapReduceTimeoutException {
        IRequestMeta meta = new RequestMeta();
        meta.contentType(Constants.CTYPE_JSON);
        try {
            MapReduceResponseSource resp = client.mapReduce(spec.getJSON(), meta);
            return convert(resp);
        } catch (RiakError e) {
            if (JSONErrorParser.isTimeoutException(e.getMessage())) {
View Full Code Here

     * @see
     * com.basho.riak.client.raw.RawClient#mapReduce(com.basho.riak.client.query
     * .MapReduceSpec)
     */
    public MapReduceResult mapReduce(MapReduceSpec spec) throws IOException, MapReduceTimeoutException {
        IRequestMeta meta = new RequestMeta();
        meta.contentType(Constants.CTYPE_JSON);
        MapReduceResponseSource resp = client.mapReduce(spec.getJSON(), meta);
        return convert(resp);
    }
View Full Code Here

     * @param storeMeta
     *            a {@link StoreMeta} for the store operation.
     * @return a {@link RequestMeta} populated from the storeMeta's values.
     */
    static RequestMeta convert(StoreMeta storeMeta, IRiakObject riakObject) {
        RequestMeta requestMeta = new RequestMeta();
        if (storeMeta.hasW()) {
            requestMeta.w(storeMeta.getW());
        }

        if (storeMeta.hasDw()) {
            requestMeta.dw(storeMeta.getDw());
        }

        if (storeMeta.hasReturnBody()) {
            requestMeta.returnBody(storeMeta.getReturnBody());
        }

        if (storeMeta.hasReturnHead()) {
            requestMeta.returnHead(storeMeta.getReturnHead());
        }

        String contentType = riakObject.getContentType();
        if (contentType != null) {
            requestMeta.contentType(contentType);
        }

        if (storeMeta.hasPw()) {
            requestMeta.pw(storeMeta.getPw());
        }

        if (storeMeta.hasIfNoneMatch()) {
            requestMeta.ifNoneMatch(storeMeta.getIfNoneMatch());
        }

        if (storeMeta.hasIfNotModified()) {
            requestMeta.ifNotModified(storeMeta.getIfNotModified());
        }

        return requestMeta;
    }
View Full Code Here

     * @see
     * com.basho.riak.client.raw.RawClient#mapReduce(com.basho.riak.client.query
     * .MapReduceSpec)
     */
    public MapReduceResult mapReduce(MapReduceSpec spec) throws IOException, MapReduceTimeoutException {
        IRequestMeta meta = new RequestMeta();
        meta.contentType(Constants.CTYPE_JSON);
        try {
            MapReduceResponseSource resp = client.mapReduce(spec.getJSON(), meta);
            return convert(resp);
        } catch (RiakError e) {
            if (JSONErrorParser.isTimeoutException(e.getMessage())) {
View Full Code Here

     * @param storeMeta
     *            a {@link StoreMeta} for the store operation.
     * @return a {@link RequestMeta} populated from the storeMeta's values.
     */
    static RequestMeta convert(StoreMeta storeMeta, IRiakObject riakObject) {
        RequestMeta requestMeta = new RequestMeta();
        if (storeMeta.hasW()) {
            requestMeta.w(storeMeta.getW().getIntValue());
        }

        if (storeMeta.hasDw()) {
            requestMeta.dw(storeMeta.getDw().getIntValue());
        }

        if (storeMeta.hasReturnBody()) {
            requestMeta.returnBody(storeMeta.getReturnBody());
        }

        if (storeMeta.hasReturnHead()) {
            requestMeta.returnHead(storeMeta.getReturnHead());
        }

        String contentType = riakObject.getContentType();
        if (contentType != null) {
            requestMeta.contentType(contentType);
        }

        if (storeMeta.hasPw()) {
            requestMeta.pw( storeMeta.getPw().getIntValue());
        }

        if (storeMeta.hasIfNoneMatch()) {
            requestMeta.ifNoneMatch(storeMeta.getIfNoneMatch());
        }

        if (storeMeta.hasIfNotModified()) {
            requestMeta.ifNotModified(storeMeta.getIfNotModified());
        }

        return requestMeta;
    }
View Full Code Here

     * @see
     * com.basho.riak.client.raw.RawClient#mapReduce(com.basho.riak.client.query
     * .MapReduceSpec)
     */
    public MapReduceResult mapReduce(MapReduceSpec spec) throws IOException, MapReduceTimeoutException {
        IRequestMeta meta = new RequestMeta();
        meta.contentType(Constants.CTYPE_JSON);
        try {
        MapReduceResponseSource resp = client.mapReduce(spec.getJSON(), meta);
        return convert(resp);
        } catch (RiakError e) {
            if( JSONErrorParser.isTimeoutException(e.getMessage())) {
View Full Code Here

     * @param storeMeta
     *            a {@link StoreMeta} for the store operation.
     * @return a {@link RequestMeta} populated from the storeMeta's values.
     */
    static RequestMeta convert(StoreMeta storeMeta, IRiakObject riakObject) {
        RequestMeta requestMeta = new RequestMeta();
        if (storeMeta.hasW()) {
            requestMeta.w(storeMeta.getW().getIntValue());
        }

        if (storeMeta.hasDw()) {
            requestMeta.dw(storeMeta.getDw().getIntValue());
        }

        if (storeMeta.hasReturnBody()) {
            requestMeta.returnBody(storeMeta.getReturnBody());
        }

        if (storeMeta.hasReturnHead()) {
            requestMeta.returnHead(storeMeta.getReturnHead());
        }

        String contentType = riakObject.getContentType();
        if (contentType != null) {
            requestMeta.contentType(contentType);
        }

        if (storeMeta.hasPw()) {
            requestMeta.pw( storeMeta.getPw().getIntValue());
        }

        if (storeMeta.hasIfNoneMatch()) {
            requestMeta.ifNoneMatch(storeMeta.getIfNoneMatch());
        }

        if (storeMeta.hasIfNotModified()) {
            requestMeta.ifNotModified(storeMeta.getIfNotModified());
        }

        return requestMeta;
    }
View Full Code Here

     * @see
     * com.basho.riak.client.raw.RawClient#mapReduce(com.basho.riak.client.query
     * .MapReduceSpec)
     */
    public MapReduceResult mapReduce(MapReduceSpec spec) throws IOException, MapReduceTimeoutException {
        IRequestMeta meta = new RequestMeta();
        meta.contentType(Constants.CTYPE_JSON);
        try {
            MapReduceResponseSource resp = client.mapReduce(spec.getJSON(), meta);
            return convert(resp);
        } catch (RiakError e) {
            if (JSONErrorParser.isTimeoutException(e.getMessage())) {
View Full Code Here

TOP

Related Classes of com.basho.riak.pbc.RequestMeta

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.