To update or create a map in Riak you construct a {@link MapUpdate} and usethis command to send it to Riak.
{@code Namespace ns = new Namespace("my_type", "my_bucket"); Location loc = new Location(ns, "my_key"); CounterUpdate cUpdate = new CounterUpdate(10L); MapUpdate update = new MapUpdate().update("my_key", cUpdate); UpdateMap um = new UpdateMap.Builder(loc, update).withReturnDatatype(true).build(); UpdateMap.Response resp = client.execute(um); RiakMap map = resp.getDatatype();}@author Brian Roach
|
|
|
|
|
|