public class UpdateSet extends UpdateDatatype<RiakSet,UpdateSet.Response>
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>
GenericRiakCommand.GenericRiakCommandWithSameInfo<R,I,CoreR>
key, namespace
Modifier and Type | Method and Description |
---|---|
protected UpdateSet.Response |
convertResponse(FutureOperation<DtUpdateOperation.Response,?,Location> request,
DtUpdateOperation.Response coreResponse) |
buildCoreOperation
convertInfo
executeAsync
execute, execute
protected UpdateSet.Response convertResponse(FutureOperation<DtUpdateOperation.Response,?,Location> request, DtUpdateOperation.Response coreResponse)
convertResponse
in class GenericRiakCommand<UpdateSet.Response,Location,DtUpdateOperation.Response,Location>
Copyright © 2016. All rights reserved.