riak-java-client 介绍
riak-java-client 是 Riak 的 Java 客户端开发类库,示例代码:
// create a client (see Configuration below in this README for more details) IRiakClient riakClient = RiakFactory.pbcClient(); //or RiakFactory.httpClient(); // create a new bucket Bucket myBucket = riakClient.createBucket("myBucket").execute(); // add data to the bucket myBucket.store("key1", "value1").execute(); //fetch it back IRiakObject myData = myBucket.fetch("key1").execute(); // you can specify extra parameters to the store operation using the // fluent builder style API myData = myBucket.store("key1", "value2").returnBody(true).execute(); // delete myBucket.delete("key1").rw(3).execute();
riak-java-client 官网
https://github.com/basho/riak-java-client
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。