Java clientId

Daniel Iwan iwan.daniel at gmail.com
Thu Aug 9 14:45:37 EDT 2012


I've read somewhere some time ago that each client connecting to Riak
cluster should
have unique id to help with resolving conflicts. Is it still the case and
if yes, what would be a recommended way
of selecting such id?

I just found in RawClient and in IRiakClient

 /**
     * If you don't set a client id explicitly at least call this to set one. It
     * generates the 4 byte ID and sets that Id on the client IE you *don't*
     * need to call setClientId() with the result of generate.
     *
     * @return the generated clientId for the client
     */

    byte[] generateAndSetClientId() throws IOException;

Would that be a way to go or is it now all automatically resolved via
vector clocks?

Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120809/4b55106f/attachment.html>


More information about the riak-users mailing list