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
IOException
public RiakClient(String host, int port) throws IOException
IOException
public RiakClient(RiakConnectionPool pool)
public RiakClient(InetAddress addr, int port) throws IOException
IOException
public RiakClient(String host, int port, int bufferSizeKb) throws IOException
IOException
public void prepareClientID() throws IOException
IOException
public void ping() throws IOException
IOException
public void setClientID(String id) throws IOException
prepareClientID()
to generate a reasonably unique Id.id
- IOException
prepareClientID()
public void setClientID(com.google.protobuf.ByteString id) throws IOException
IOException
public String getClientID() throws IOException
IOException
public Map<String,String> getServerInfo() throws IOException
IOException
public RiakObject[] fetch(String bucket, String key, int readQuorum) throws IOException
IOException
public RiakObject[] fetch(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key, int readQuorum) throws IOException
IOException
public FetchResponse fetch(String bucket, String key, FetchMeta fetchMeta) throws IOException
IOException
public FetchResponse fetch(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key, FetchMeta fetchMeta) throws IOException
IOException
public RiakObject[] fetch(String bucket, String key) throws IOException
IOException
public RiakObject[] fetch(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key) throws IOException
IOException
public com.google.protobuf.ByteString[] store(RiakObject[] values, RequestMeta meta) throws IOException
IOException
public void store(RiakObject value) throws IOException
IOException
public RiakObject[] store(RiakObject value, IRequestMeta meta) throws IOException
IOException
public void delete(String bucket, String key, DeleteMeta deleteMeta) throws IOException
IOException
public void delete(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key, DeleteMeta deleteMeta) throws IOException
IOException
public void delete(String bucket, String key, int rw) throws IOException
IOException
public void delete(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key, int rw) throws IOException
IOException
public void delete(String bucket, String key) throws IOException
IOException
public void delete(com.google.protobuf.ByteString bucket, com.google.protobuf.ByteString key) throws IOException
IOException
public com.google.protobuf.ByteString[] listBuckets() throws IOException
IOException
public BucketProperties getBucketProperties(com.google.protobuf.ByteString bucket) throws IOException
IOException
public void setBucketProperties(com.google.protobuf.ByteString bucket, BucketProperties props) throws IOException
IOException
public KeySource listKeys(com.google.protobuf.ByteString bucket) throws IOException
IOException
public MapReduceResponseSource mapReduce(org.json.JSONObject obj) throws IOException
IOException
public MapReduceResponseSource mapReduce(String request, IRequestMeta meta) throws IOException
IOException
public MapReduceResponseSource mapReduce(com.google.protobuf.ByteString request, IRequestMeta meta) throws IOException
IOException
public void shutdown()
Copyright © 2012. All Rights Reserved.