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

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


     */
    public FetchResponse fetch(RequestMeta meta) {
        if (riak == null)
            throw new IllegalStateException("Cannot fetch an object without a RiakClient");

        FetchResponse r = riak.fetch(bucket, key, meta);
        if (r.getObject() != null) {
            RiakObject other = r.getObject();
            shallowCopy(other);
            r.setObject(this);
        }
        return r;
    }
View Full Code Here


     */
    public FetchResponse fetchMeta(RequestMeta meta) {
        if (riak == null)
            throw new IllegalStateException("Cannot fetch meta for an object without a RiakClient");

        FetchResponse r = riak.fetchMeta(bucket, key, meta);
        if (r.isSuccess()) {
            this.updateMeta(r);
        }
        return r;
    }
View Full Code Here

        if (key == null || key.trim().equals("")) {
            throw new IllegalArgumentException("Key cannot be null or empty or just whitespace");
        }

        FetchResponse resp = client.fetch(bucket, key);

        return handleBodyResponse(resp);
    }
View Full Code Here

        if (key == null || key.trim().equals("")) {
            throw new IllegalArgumentException("Key cannot be null or empty or just whitespace");
        }

        FetchResponse resp = client.fetch(bucket, key, RequestMeta.readParams(readQuorum));

        return handleBodyResponse(resp);
    }
View Full Code Here

        if (key == null || key.trim().equals("")) {
            throw new IllegalArgumentException("Key cannot be null or empty or just whitespace");
        }
        RequestMeta rm = convert(fetchMeta);

        FetchResponse resp = client.fetch(bucket, key, rm);
        return handleBodyResponse(resp);
    }
View Full Code Here

                                      fetchMeta.getBasicQuorum(), true, fetchMeta.getReturnDeletedVClock(),
                                      fetchMeta.getIfModifiedSince(), fetchMeta.getIfModifiedVClock());
        }

        RequestMeta rm = convert(fetchMeta);
        FetchResponse resp = client.fetchMeta(bucket, key, rm);
        return handleBodyResponse(resp);
    }
View Full Code Here

        if (key == null || key.trim().equals("")) {
            throw new IllegalArgumentException("Key cannot be null or empty or just whitespace");
        }

        FetchResponse resp = client.fetch(bucket, key);

        return handleBodyResponse(resp);
    }
View Full Code Here

        if (key == null || key.trim().equals("")) {
            throw new IllegalArgumentException("Key cannot be null or empty or just whitespace");
        }

        FetchResponse resp = client.fetch(bucket, key, RequestMeta.readParams(readQuorum));

        return handleBodyResponse(resp);
    }
View Full Code Here

        if (key == null || key.trim().equals("")) {
            throw new IllegalArgumentException("Key cannot be null or empty or just whitespace");
        }
        RequestMeta rm = convert(fetchMeta);

        FetchResponse resp = client.fetch(bucket, key, rm);
        return handleBodyResponse(resp);
    }
View Full Code Here

        if (storeMeta.hasReturnBody() && storeMeta.getReturnBody()) {
            response = handleBodyResponse(resp);
        } else if(storeMeta.hasReturnHead() && storeMeta.getReturnHead()) {
            // fake a returnHead by doing a head fetch now
            FetchResponse fr = client.fetchMeta(object.getBucket(), object.getKey());
            response = handleBodyResponse(fr);
        }

        return response;
    }
View Full Code Here

TOP

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

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.