public class RiakClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MSG_DelReq |
static int |
MSG_DelResp |
static int |
MSG_ErrorResp |
static int |
MSG_GetBucketReq |
static int |
MSG_GetBucketResp |
static int |
MSG_GetClientIdReq |
static int |
MSG_GetClientIdResp |
static int |
MSG_GetReq |
static int |
MSG_GetResp |
static int |
MSG_GetServerInfoReq |
static int |
MSG_GetServerInfoResp |
static int |
MSG_ListBucketsReq |
static int |
MSG_ListBucketsResp |
static int |
MSG_ListKeysReq |
static int |
MSG_ListKeysResp |
static int |
MSG_MapRedReq |
static int |
MSG_MapRedResp |
static int |
MSG_PingReq |
static int |
MSG_PingResp |
static int |
MSG_PutReq |
static int |
MSG_PutResp |
static int |
MSG_SetBucketReq |
static int |
MSG_SetBucketResp |
static int |
MSG_SetClientIdReq |
static int |
MSG_SetClientIdResp |
| Constructor and Description |
|---|
RiakClient(InetAddress addr,
int port) |
RiakClient(RiakConnectionPool pool) |
RiakClient(String host) |
RiakClient(String host,
int port) |
RiakClient(String host,
int port,
int bufferSizeKb) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key) |
void |
delete(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key,
DeleteMeta deleteMeta) |
void |
delete(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key,
int rw) |
void |
delete(String bucket,
String key) |
void |
delete(String bucket,
String key,
DeleteMeta deleteMeta) |
void |
delete(String bucket,
String key,
int rw) |
RiakObject[] |
fetch(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key) |
FetchResponse |
fetch(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key,
FetchMeta fetchMeta) |
RiakObject[] |
fetch(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key,
int readQuorum) |
RiakObject[] |
fetch(String bucket,
String key) |
FetchResponse |
fetch(String bucket,
String key,
FetchMeta fetchMeta) |
RiakObject[] |
fetch(String bucket,
String key,
int readQuorum) |
BucketProperties |
getBucketProperties(com.google.protobuf.ByteString bucket) |
String |
getClientID() |
Map<String,String> |
getServerInfo() |
com.google.protobuf.ByteString[] |
listBuckets() |
KeySource |
listKeys(com.google.protobuf.ByteString bucket) |
MapReduceResponseSource |
mapReduce(com.google.protobuf.ByteString request,
IRequestMeta meta) |
MapReduceResponseSource |
mapReduce(org.json.JSONObject obj) |
MapReduceResponseSource |
mapReduce(String request,
IRequestMeta meta) |
void |
ping() |
void |
prepareClientID()
helper method to use a reasonable default client id
beware, it caches the client id.
|
void |
setBucketProperties(com.google.protobuf.ByteString bucket,
BucketProperties props) |
void |
setClientID(com.google.protobuf.ByteString id) |
void |
setClientID(String id)
Warning: the riak client id is 4 bytes.
|
void |
shutdown() |
void |
store(RiakObject value) |
com.google.protobuf.ByteString[] |
store(RiakObject[] values,
RequestMeta meta) |
RiakObject[] |
store(RiakObject value,
IRequestMeta meta) |
public static final int MSG_ErrorResp
public static final int MSG_PingReq
public static final int MSG_PingResp
public static final int MSG_GetClientIdReq
public static final int MSG_GetClientIdResp
public static final int MSG_SetClientIdReq
public static final int MSG_SetClientIdResp
public static final int MSG_GetServerInfoReq
public static final int MSG_GetServerInfoResp
public static final int MSG_GetReq
public static final int MSG_GetResp
public static final int MSG_PutReq
public static final int MSG_PutResp
public static final int MSG_DelReq
public static final int MSG_DelResp
public static final int MSG_ListBucketsReq
public static final int MSG_ListBucketsResp
public static final int MSG_ListKeysReq
public static final int MSG_ListKeysResp
public static final int MSG_GetBucketReq
public static final int MSG_GetBucketResp
public static final int MSG_SetBucketReq
public static final int MSG_SetBucketResp
public static final int MSG_MapRedReq
public static final int MSG_MapRedResp
public RiakClient(String host) throws IOException
IOExceptionpublic RiakClient(String host, int port) throws IOException
IOExceptionpublic RiakClient(RiakConnectionPool pool)
public RiakClient(InetAddress addr, int port) throws IOException
IOExceptionpublic RiakClient(String host, int port, int bufferSizeKb) throws IOException
IOExceptionpublic void prepareClientID()
throws IOException
IOExceptionpublic void ping()
throws IOException
IOExceptionpublic void setClientID(String id) throws IOException
prepareClientID() to generate a reasonably unique Id.id - IOExceptionprepareClientID()public void setClientID(com.google.protobuf.ByteString id)
throws IOException
IOExceptionpublic String getClientID() throws IOException
IOExceptionpublic Map<String,String> getServerInfo() throws IOException
IOExceptionpublic RiakObject[] fetch(String bucket, String key, int readQuorum) throws IOException
IOExceptionpublic RiakObject[] fetch(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key, int readQuorum) throws IOException
IOExceptionpublic FetchResponse fetch(String bucket, String key, FetchMeta fetchMeta) throws IOException
IOExceptionpublic FetchResponse fetch(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key, FetchMeta fetchMeta) throws IOException
IOExceptionpublic RiakObject[] fetch(String bucket, String key) throws IOException
IOExceptionpublic RiakObject[] fetch(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key) throws IOException
IOExceptionpublic com.google.protobuf.ByteString[] store(RiakObject[] values, RequestMeta meta) throws IOException
IOExceptionpublic void store(RiakObject value) throws IOException
IOExceptionpublic RiakObject[] store(RiakObject value, IRequestMeta meta) throws IOException
IOExceptionpublic void delete(String bucket, String key, DeleteMeta deleteMeta) throws IOException
IOExceptionpublic void delete(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key,
DeleteMeta deleteMeta)
throws IOException
IOExceptionpublic void delete(String bucket, String key, int rw) throws IOException
IOExceptionpublic void delete(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key,
int rw)
throws IOException
IOExceptionpublic void delete(String bucket, String key) throws IOException
IOExceptionpublic void delete(com.google.protobuf.ByteString bucket,
com.google.protobuf.ByteString key)
throws IOException
IOExceptionpublic com.google.protobuf.ByteString[] listBuckets()
throws IOException
IOExceptionpublic BucketProperties getBucketProperties(com.google.protobuf.ByteString bucket) throws IOException
IOExceptionpublic void setBucketProperties(com.google.protobuf.ByteString bucket,
BucketProperties props)
throws IOException
IOExceptionpublic KeySource listKeys(com.google.protobuf.ByteString bucket) throws IOException
IOExceptionpublic MapReduceResponseSource mapReduce(org.json.JSONObject obj) throws IOException
IOExceptionpublic MapReduceResponseSource mapReduce(String request, IRequestMeta meta) throws IOException
IOExceptionpublic MapReduceResponseSource mapReduce(com.google.protobuf.ByteString request, IRequestMeta meta) throws IOException
IOExceptionpublic void shutdown()
Copyright © 2012. All Rights Reserved.