Package com.basho.riak.client.http.response

Examples of com.basho.riak.client.http.response.RiakResponseRuntimeException


        if (r.getStatusCode() == 404)
            return null;

        if (r.getStatusCode() != 200 && r.getStatusCode() != 304)
            throw new RiakResponseException(new RiakResponseRuntimeException(r, r.getBodyAsString()));

        if (r.getStatusCode() == 200 && !(r.hasObject() || r.hasSiblings()))
            throw new RiakResponseException(new RiakResponseRuntimeException(r, "Failed to parse object"));

        if (r.hasSiblings())
            return r.getSiblings();
        return Arrays.asList(r.getObject());
    }
View Full Code Here


     */
    public void delete(String bucket, String key, RequestMeta meta) throws RiakIOException, RiakResponseException {
        HttpResponse r = impl.delete(bucket, key, meta);

        if (r.getStatusCode() != 204 && r.getStatusCode() != 404)
            throw new RiakResponseException(new RiakResponseRuntimeException(r, r.getBodyAsString()));
    }
View Full Code Here

        if (r.getStatusCode() == 404)
            return null;

        if (r.getStatusCode() != 200)
            throw new RiakResponseException(new RiakResponseRuntimeException(r, r.getBodyAsString()));

        if (!r.hasSteps())
            throw new RiakResponseException(new RiakResponseRuntimeException(r, "Failed to parse walk results"));

        return r.getSteps();
    }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.http.response.RiakResponseRuntimeException

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.