Hi Brian,

I know what you mean about https://github.com/basho/riak-java-client/issues/175 which by modifying the current *Mutation<T>* interface will break existing code, what about adding a *CriteriaMutation<T>* or *OptionalMutation<T>* interface that *extends* the *Mutation<T>* interface?

That way the current code won't break and you will be adding a real solution to the mutation inability of saying if the object was mutated or not, I strongly believe that the current withoutFetch...() is a workaround rather than a real solution and very prone to errors, it is more complex to work around the fetch, modify and store or not than just having a central logic inside the mutation that will just return true or false and let the Riak java client handle it.

At the Riak java client it will just require to ask *if (mutation instanceof CriteriaMutation) {...}* to determine if just proceed without asking if it was really mutated or not or just proceed. It will also help Riak clusters, it implies less writes which are expensive.

Regards,

Guido.
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to