We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 219c403 commit ccb99b1Copy full SHA for ccb99b1
1 file changed
src/main/java/eu/antidotedb/client/MergeRegisterKey.java
@@ -3,6 +3,7 @@
3
import com.google.protobuf.ByteString;
4
import eu.antidotedb.antidotepb.AntidotePB;
5
6
+import javax.annotation.CheckReturnValue;
7
import java.util.List;
8
9
public class MergeRegisterKey<V> extends Key<V> {
@@ -23,4 +24,14 @@ public interface ValueMerger<V> {
23
24
V readResponseToValue(AntidotePB.ApbReadObjectResp resp) {
25
return merger.merge(ResponseDecoder.multiValueRegister(format).readResponseToValue(resp));
26
}
27
+
28
+ /**
29
+ * Creates an update operation which assigns a new value to the register.
30
+ * <p>
31
+ * Use the methods on {@link Bucket} to execute the update.
32
+ */
33
+ @CheckReturnValue
34
+ public UpdateOpDefaultImpl assign(V value) {
35
+ return RegisterKey.buildRegisterUpdate(this, format.encode(value));
36
+ }
37
0 commit comments