public class UpdateSet extends UpdateDatatype<RiakSet,UpdateSet.Response,Location>
To update or create a set in Riak you construct a SetUpdate and use
this command to send it to Riak.
Namespace ns = new Namespace("my_type", "my_bucket");
Location loc = new Location(ns, "my_key");
SetUpdate update = new SetUpdate().add("some_new_value");
UpdateSet us = new UpdateSet.Builder(loc, update).withReturnDatatype(true).build();
UpdateSet.Response resp = client.execute(us);
RiakSet = resp.getDatatype();
| Modifier and Type | Class and Description |
|---|---|
static class |
UpdateSet.Builder
Builder used to construct an UpdateSet command.
|
static class |
UpdateSet.Response
A response from an UpdateSet command.
|
UpdateDatatype.Option<T>key, namespace| Modifier and Type | Method and Description |
|---|---|
protected RiakFuture<UpdateSet.Response,Location> |
executeAsync(RiakCluster cluster) |
buildCoreOperationexecute, executeprotected RiakFuture<UpdateSet.Response,Location> executeAsync(RiakCluster cluster)
executeAsync in class RiakCommand<UpdateSet.Response,Location>Copyright © 2016. All rights reserved.