Java client API

Russell Brown russell.brown at me.com
Sun Mar 27 03:09:58 EDT 2011


On 27 Mar 2011, at 05:13, Wilson MacGyver wrote:

> two questions jump out right away
> 
> 1: how do you fetch linked records using the API? and how do you setup
> link for records?

I didn't add the m/r or link walking stuff yet, will do soon and post a link, it would be something like it is now, a builder and an execute/submit method to run the job. The result would be Java types and not tied to the the Crockford JSON lib.

> 
> 2: it's not obvious from reading the code how to set the r and w value
> during read and write. is it
> using the rw() method?

Ah, well I guess it is not clear enough. on a Fetch you'd set the r()[1], on a Store you'd set the w()[2] and dw()[3] and on a delete you'd set the dw()[4] (much like now). An example usage is here[5]. 

Was using an actual type (like FetchCAP, StoreCAP and DeleteCAP) a better option, do you think?

Thanks for the comments, I'll see what I can do to make it clearer.

Russell

[1] https://github.com/russelldb/riak-java-client-api/blob/fluent/src/main/java/com/basho/riak/client/FetchOperation.java#L39
[2] https://github.com/russelldb/riak-java-client-api/blob/fluent/src/main/java/com/basho/riak/client/StoreOperation.java#L41
[3] https://github.com/russelldb/riak-java-client-api/blob/fluent/src/main/java/com/basho/riak/client/StoreOperation.java#L46
[4] https://github.com/russelldb/riak-java-client-api/blob/fluent/src/main/java/com/basho/riak/client/DeleteOperation.java#L34
[5] https://github.com/russelldb/riak-java-client-api/blob/fluent/src/test/java/com/basho/riak/client/BasicOperations.java

> 
> Thanks
> 
> 
> 
> -- 
> Omnem crede diem tibi diluxisse supremum.
> 
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com





More information about the riak-users mailing list