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

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


     * (non-Javadoc)
     *
     * @see com.basho.riak.client.raw.RawClient#listBuckets()
     */
    public Set<String> listBuckets() throws IOException {
        final ListBucketsResponse lbr = client.listBuckets();

        if (!lbr.isSuccess()) {
            throw new IOException("List Buckets failed with status code: " + lbr.getStatusCode());
        }
        return new HashSet<String>(lbr.getBuckets());
    }
View Full Code Here


     * (non-Javadoc)
     *
     * @see com.basho.riak.client.raw.RawClient#listBuckets()
     */
    public Set<String> listBuckets() throws IOException {
        final ListBucketsResponse lbr = client.listBuckets();

        if (!lbr.isSuccess()) {
            throw new IOException("List Buckets failed with status code: " + lbr.getStatusCode());
        }
        return new HashSet<String>(lbr.getBuckets());
    }
View Full Code Here

     * @throws JSONException
     */
    public ListBucketsResponse listBuckets() {
        HttpResponse r = helper.listBuckets();
        try {
            return new ListBucketsResponse(r);
        } catch (JSONException e) {
            try {
                return new ListBucketsResponse(helper.toss(new RiakResponseRuntimeException(r, e)));
            } catch (Exception e1) {
                throw new IllegalStateException(
                                                "helper.toss() returns a unsuccessful result, so BucketResponse shouldn't try to parse it or throw");
            }
        } catch (IOException e) {
            try {
                return new ListBucketsResponse(helper.toss(new RiakIORuntimeException(e)));
            } catch (Exception e1) {
                throw new IllegalStateException(
                                                "helper.toss() returns a unsuccessful result, so BucketResponse shouldn't try to read it or throw");
            }
        }
View Full Code Here

     * (non-Javadoc)
     *
     * @see com.basho.riak.client.raw.RawClient#listBuckets()
     */
    public Set<String> listBuckets() throws IOException {
        final ListBucketsResponse lbr = client.listBuckets();

        if (!lbr.isSuccess()) {
            throw new IOException("List Buckets failed with status code: " + lbr.getStatusCode());
        }
        return new HashSet<String>(lbr.getBuckets());
    }
View Full Code Here

     * (non-Javadoc)
     *
     * @see com.basho.riak.client.raw.RawClient#listBuckets()
     */
    public Set<String> listBuckets() throws IOException {
        final ListBucketsResponse lbr = client.listBuckets();

        if (!lbr.isSuccess()) {
            throw new IOException("List Buckets failed with status code: " + lbr.getStatusCode());
        }
        return new HashSet<String>(lbr.getBuckets());
    }
View Full Code Here

     * (non-Javadoc)
     *
     * @see com.basho.riak.client.raw.RawClient#listBuckets()
     */
    public Set<String> listBuckets() throws IOException {
        final ListBucketsResponse lbr = client.listBuckets(false);

        if (!lbr.isSuccess()) {
            throw new IOException("List Buckets failed with status code: " + lbr.getStatusCode());
        }
        return new HashSet<String>(lbr.getBuckets());
    }
View Full Code Here

        }
        return new HashSet<String>(lbr.getBuckets());
    }

    public StreamingOperation<String> listBucketsStreaming() throws IOException {
        final ListBucketsResponse lbr = client.listBuckets(true);
        if (!lbr.isSuccess()) {
            throw new IOException("List Buckets failed with status code: " + lbr.getStatusCode());
        }
        else
        {
            return new BucketSource(lbr);
        }
View Full Code Here

     * (non-Javadoc)
     *
     * @see com.basho.riak.client.raw.RawClient#listBuckets()
     */
    public Set<String> listBuckets() throws IOException {
        final ListBucketsResponse lbr = client.listBuckets();

        if (!lbr.isSuccess()) {
            throw new IOException("List Buckets failed with status code: " + lbr.getStatusCode());
        }
        return new HashSet<String>(lbr.getBuckets());
    }
View Full Code Here

TOP

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

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.