|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.basho.riak.client.plain.PlainClient
WARNING: This class will be REMOVED in the next version.
@Deprecated public class PlainClient
An adapter from RiakClient to a slightly less HTTP, more
Java-centric, interface. Objects are returned without HTTP specific
information and exceptions are thrown on unsuccessful responses.
PlainClient| Constructor Summary | |
|---|---|
PlainClient(RiakClient riakClient)
Deprecated. The primary constructor. |
|
| Method Summary | |
|---|---|
void |
delete(String bucket,
String key)
Deprecated. |
void |
delete(String bucket,
String key,
RequestMeta meta)
Deprecated. Like RiakClient.delete(String, String, RequestMeta), except
throws on a non-200 or 404 response. |
RiakObject |
fetch(String bucket,
String key)
Deprecated. |
RiakObject |
fetch(String bucket,
String key,
RequestMeta meta)
Deprecated. Like RiakClient.fetch(String, String, RequestMeta), except it
returns the fetched object directly or throws if the response is not a
200, 304 or 404. |
Collection<? extends RiakObject> |
fetchAll(String bucket,
String key)
Deprecated. |
Collection<? extends RiakObject> |
fetchAll(String bucket,
String key,
RequestMeta meta)
Deprecated. Like RiakClient.fetch(String, String, RequestMeta), except it
returns the all the fetched objects directly or throws if the response is
not a 200, 304 or 404. |
RiakObject |
fetchMeta(String bucket,
String key)
Deprecated. |
RiakObject |
fetchMeta(String bucket,
String key,
RequestMeta meta)
Deprecated. Like RiakClient.fetchMeta(String, String, RequestMeta), except it
returns the fetched object metadata directly or throws if the response is
not a 200, 304 or 404. |
static PlainClient |
getClient(RiakConfig config)
Deprecated. Connect to Riak using the given configuration. |
static PlainClient |
getClient(String url)
Deprecated. Connect to Riak using the given URL. |
RiakBucketInfo |
listBucket(String bucket)
Deprecated. |
RiakBucketInfo |
listBucket(String bucket,
RequestMeta meta)
Deprecated. Like RiakClient.listBucket(String, RequestMeta), except throws on
a non-200 response |
void |
setBucketSchema(String bucket,
RiakBucketInfo bucketInfo)
Deprecated. |
void |
setBucketSchema(String bucket,
RiakBucketInfo bucketInfo,
RequestMeta meta)
Deprecated. Like RiakClient.setBucketSchema(String, RiakBucketInfo, RequestMeta),
except throws on a non-204 response. |
void |
store(RiakObject object)
Deprecated. |
void |
store(RiakObject object,
RequestMeta meta)
Deprecated. Like RiakClient.store(RiakObject, RequestMeta), except throws on
a non-200 or 204 response and updates the passed in RiakObject
with new metadata from Riak. |
boolean |
stream(String bucket,
String key,
StreamHandler handler,
RequestMeta meta)
Deprecated. Identical to RiakClient.stream(String, String, StreamHandler, RequestMeta). |
List<? extends List<? extends RiakObject>> |
walk(String bucket,
String key,
RiakWalkSpec walkSpec)
Deprecated. |
List<? extends List<? extends RiakObject>> |
walk(String bucket,
String key,
String walkSpec)
Deprecated. |
List<? extends List<? extends RiakObject>> |
walk(String bucket,
String key,
String walkSpec,
RequestMeta meta)
Deprecated. Like RiakClient.walk(String, String, String, RequestMeta), except
throws on a non-200 or 404 response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlainClient(RiakClient riakClient)
RiakClient and
installs a custom RiakExceptionHandler.
| Method Detail |
|---|
public static PlainClient getClient(RiakConfig config)
public static PlainClient getClient(String url)
public void setBucketSchema(String bucket,
RiakBucketInfo bucketInfo,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.setBucketSchema(String, RiakBucketInfo, RequestMeta),
except throws on a non-204 response.
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - if the server does not successfully update the bucket schema.
public void setBucketSchema(String bucket,
RiakBucketInfo bucketInfo)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public RiakBucketInfo listBucket(String bucket,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.listBucket(String, RequestMeta), except throws on
a non-200 response
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - if the server does not return the bucket information
public RiakBucketInfo listBucket(String bucket)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public void store(RiakObject object,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.store(RiakObject, RequestMeta), except throws on
a non-200 or 204 response and updates the passed in RiakObject
with new metadata from Riak.
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - If the server does not succesfully store the object.
public void store(RiakObject object)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public RiakObject fetchMeta(String bucket,
String key,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.fetchMeta(String, String, RequestMeta), except it
returns the fetched object metadata directly or throws if the response is
not a 200, 304 or 404.
RiakObject or null if object doesn't exist.
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - If the server does return a valid object
public RiakObject fetchMeta(String bucket,
String key)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public RiakObject fetch(String bucket,
String key,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.fetch(String, String, RequestMeta), except it
returns the fetched object directly or throws if the response is not a
200, 304 or 404.
RiakObject or null if object doesn't exist. If siblings
exist, then returns one of the siblings.
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - If the server does return a valid object
public RiakObject fetch(String bucket,
String key)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public Collection<? extends RiakObject> fetchAll(String bucket,
String key,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.fetch(String, String, RequestMeta), except it
returns the all the fetched objects directly or throws if the response is
not a 200, 304 or 404.
RiakObject or null no object exist.
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - If the server does return any valid objects
public Collection<? extends RiakObject> fetchAll(String bucket,
String key)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public boolean stream(String bucket,
String key,
StreamHandler handler,
RequestMeta meta)
throws IOException
RiakClient.stream(String, String, StreamHandler, RequestMeta).
IOException
public void delete(String bucket,
String key,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.delete(String, String, RequestMeta), except
throws on a non-200 or 404 response. Note that delete succeeds if the
object did not previously exist (404 response).
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - If the object was not deleted.
public void delete(String bucket,
String key)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public List<? extends List<? extends RiakObject>> walk(String bucket,
String key,
String walkSpec,
RequestMeta meta)
throws RiakIOException,
RiakResponseException
RiakClient.walk(String, String, String, RequestMeta), except
throws on a non-200 or 404 response.
RiakObjects corresponding to steps of
the walk. Returns null if the source object doesn't exist.
RiakIOException - If an error occurs during communication with the Riak server.
RiakResponseException - If the links could not be walked or the result steps were not
returned.
public List<? extends List<? extends RiakObject>> walk(String bucket,
String key,
String walkSpec)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
public List<? extends List<? extends RiakObject>> walk(String bucket,
String key,
RiakWalkSpec walkSpec)
throws RiakIOException,
RiakResponseException
RiakIOException
RiakResponseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||