WARNING: This class will be REMOVED in the next version.
@Deprecated public class ClientHelper extends Object
ClientHelper| Constructor and Description |
|---|
ClientHelper(RiakConfig config,
String clientId)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
HttpResponse |
delete(String bucket,
String key,
RequestMeta meta)
Deprecated.
Same as
RiakClient, except only returning the HTTP response |
HttpResponse |
fetch(String bucket,
String key,
RequestMeta meta)
Deprecated.
|
HttpResponse |
fetch(String bucket,
String key,
RequestMeta meta,
boolean streamResponse)
Deprecated.
Same as
RiakClient, except only returning the HTTP response and
allows the response to be streamed. |
HttpResponse |
fetchMeta(String bucket,
String key,
RequestMeta meta)
Deprecated.
Same as
RiakClient, except only returning the HTTP response |
HttpResponse |
getBucketSchema(String bucket,
RequestMeta meta)
Deprecated.
Same as
RiakClient.getBucketSchema(String, RequestMeta), except
only returning the HTTP response. |
byte[] |
getClientId()
Deprecated.
|
RiakConfig |
getConfig()
Deprecated.
|
RiakExceptionHandler |
getExceptionHandler()
Deprecated.
|
org.apache.http.client.HttpClient |
getHttpClient()
Deprecated.
Return the
HttpClient used to make requests, which can be
configured. |
HttpResponse |
listBucket(String bucket,
RequestMeta meta,
boolean streamResponse)
Deprecated.
Same as
RiakClient, except only returning the HTTP response, and
if streamResponse==true, the response will be streamed back, so the user
is responsible for calling HttpResponseDecorator.close() |
HttpResponse |
listBuckets()
Deprecated.
List the buckets in Riak
|
HttpResponse |
mapReduce(String job,
RequestMeta meta)
Deprecated.
Same as
RiakClient, except only returning the HTTP response |
HttpResponse |
setBucketSchema(String bucket,
org.json.JSONObject schema,
RequestMeta meta)
Deprecated.
See
RiakClient#setBucketSchema(String, com.basho.riak.client.http.RiakBucketInfo, RequestMeta) |
void |
setClientId(String clientId)
Deprecated.
|
void |
setExceptionHandler(RiakExceptionHandler exceptionHandler)
Deprecated.
Install an exception handler.
|
HttpResponse |
store(RiakObject object,
RequestMeta meta)
Deprecated.
Same as
RiakClient, except only returning the HTTP response |
boolean |
stream(String bucket,
String key,
StreamHandler handler,
RequestMeta meta)
Deprecated.
Same as
RiakClient, except only returning the HTTP response |
HttpResponse |
toss(RiakIORuntimeException e)
Deprecated.
Hands exception
e to installed exception handler if there is
one or throw it. |
HttpResponse |
toss(RiakResponseRuntimeException e)
Deprecated.
|
HttpResponse |
walk(String bucket,
String key,
String walkSpec,
RequestMeta meta)
Deprecated.
Same as
RiakClient, except only returning the HTTP response |
public ClientHelper(RiakConfig config, String clientId)
public byte[] getClientId()
public void setClientId(String clientId)
public HttpResponse setBucketSchema(String bucket, org.json.JSONObject schema, RequestMeta meta)
RiakClient#setBucketSchema(String, com.basho.riak.client.http.RiakBucketInfo, RequestMeta)public HttpResponse getBucketSchema(String bucket, RequestMeta meta)
RiakClient.getBucketSchema(String, RequestMeta), except
only returning the HTTP response.public HttpResponse listBuckets()
HttpResponse whose body should be the result of asking
Riak to list buckets.public HttpResponse listBucket(String bucket, RequestMeta meta, boolean streamResponse)
RiakClient, except only returning the HTTP response, and
if streamResponse==true, the response will be streamed back, so the user
is responsible for calling HttpResponseDecorator.close()public HttpResponse store(RiakObject object, RequestMeta meta)
RiakClient, except only returning the HTTP responsepublic HttpResponse fetchMeta(String bucket, String key, RequestMeta meta)
RiakClient, except only returning the HTTP responsepublic HttpResponse fetch(String bucket, String key, RequestMeta meta, boolean streamResponse)
RiakClient, except only returning the HTTP response and
allows the response to be streamed.bucket - Same as RiakClientkey - Same as RiakClientmeta - Same as RiakClientstreamResponse - If true, the connection will NOT be released. Use
HttpResponse.getHttpMethod().getResponseBodyAsStream() to get
the response stream; HttpResponse.getBody() will return null.RiakClientpublic HttpResponse fetch(String bucket, String key, RequestMeta meta)
public boolean stream(String bucket, String key, StreamHandler handler, RequestMeta meta) throws IOException
RiakClient, except only returning the HTTP responseIOExceptionpublic HttpResponse delete(String bucket, String key, RequestMeta meta)
RiakClient, except only returning the HTTP responsepublic HttpResponse walk(String bucket, String key, String walkSpec, RequestMeta meta)
RiakClient, except only returning the HTTP responsepublic HttpResponse mapReduce(String job, RequestMeta meta)
RiakClient, except only returning the HTTP responsepublic RiakExceptionHandler getExceptionHandler()
public void setExceptionHandler(RiakExceptionHandler exceptionHandler)
public HttpResponse toss(RiakIORuntimeException e)
e to installed exception handler if there is
one or throw it.HttpResponse.public HttpResponse toss(RiakResponseRuntimeException e)
public org.apache.http.client.HttpClient getHttpClient()
HttpClient used to make requests, which can be
configured.public RiakConfig getConfig()
Copyright © 2014. All Rights Reserved.