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

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


    public BucketProperties fetchBucket(String bucketName) throws IOException {
        if (bucketName == null || bucketName.trim().equals("")) {
            throw new IllegalArgumentException("bucketName cannot be null, empty or all whitespace");
        }

        BucketResponse response = client.getBucketSchema(bucketName, null);

        return convert(response);
    }
View Full Code Here


     *
     * @see
     * com.basho.riak.client.raw.RawClient#fetchBucketKeys(java.lang.String)
     */
    public Iterable<String> listKeys(String bucketName) throws IOException {
        final BucketResponse bucketResponse = client.streamBucket(bucketName);
        if (bucketResponse.isSuccess()) {
            final KeySource keyStream = new KeySource(bucketResponse);
            return new Iterable<String>() {
                public Iterator<String> iterator() {
                    return keyStream;
                }
            };
        } else {
            throw new IOException("stream keys for bucket " + bucketName + " failed with response code : " +
                                  bucketResponse.getStatusCode() + ", body: " + bucketResponse.getBodyAsString());
        }
    }
View Full Code Here

    public BucketProperties fetchBucket(String bucketName) throws IOException {
        if (bucketName == null || bucketName.trim().equals("")) {
            throw new IllegalArgumentException("bucketName cannot be null, empty or all whitespace");
        }

        BucketResponse response = client.getBucketSchema(bucketName, null);

        return convert(response);
    }
View Full Code Here

     *
     * @see
     * com.basho.riak.client.raw.RawClient#fetchBucketKeys(java.lang.String)
     */
    public StreamingOperation<String> listKeys(String bucketName) throws IOException {
        final BucketResponse bucketResponse = client.streamBucket(bucketName);
        if (bucketResponse.isSuccess()) {
            return new KeySource(bucketResponse);
        } else {
            throw new IOException("stream keys for bucket " + bucketName + " failed with response code : " +
                                  bucketResponse.getStatusCode() + ", body: " + bucketResponse.getBodyAsString());
        }
    }
View Full Code Here

    public BucketProperties fetchBucket(String bucketName) throws IOException {
        if (bucketName == null || bucketName.trim().equals("")) {
            throw new IllegalArgumentException("bucketName cannot be null, empty or all whitespace");
        }

        BucketResponse response = client.getBucketSchema(bucketName, null);

        return convert(response);
    }
View Full Code Here

     *
     * @see
     * com.basho.riak.client.raw.RawClient#fetchBucketKeys(java.lang.String)
     */
    public Iterable<String> listKeys(String bucketName) throws IOException {
        final BucketResponse bucketResponse = client.streamBucket(bucketName);
        if (bucketResponse.isSuccess()) {
            final KeySource keyStream = new KeySource(bucketResponse);
            return new Iterable<String>() {
                public Iterator<String> iterator() {
                    return keyStream;
                }
            };
        } else {
            throw new IOException("stream keys for bucket " + bucketName + " failed with response code : " +
                                  bucketResponse.getStatusCode() + ", body: " + bucketResponse.getBodyAsString());
        }
    }
View Full Code Here

TOP

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

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.