summaryrefslogtreecommitdiff
path: root/same/src/main/java/com/orbekk/same/VariableFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/main/java/com/orbekk/same/VariableFactory.java')
-rw-r--r--same/src/main/java/com/orbekk/same/VariableFactory.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/same/src/main/java/com/orbekk/same/VariableFactory.java b/same/src/main/java/com/orbekk/same/VariableFactory.java
index f1796d6..fa9eeeb 100644
--- a/same/src/main/java/com/orbekk/same/VariableFactory.java
+++ b/same/src/main/java/com/orbekk/same/VariableFactory.java
@@ -10,6 +10,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.orbekk.same.State.Component;
+import com.orbekk.util.DelayedOperation;
/**
* TODO: Use WeakReference in order to make variables GC-able.
@@ -37,12 +38,12 @@ public class VariableFactory {
}
@Override
- public void set(T value) throws UpdateConflict {
+ public DelayedOperation set(T value) {
try {
String serializedValue = mapper.writeValueAsString(value);
State.Component update = new State.Component(identifier,
revision, serializedValue);
- client.set(update);
+ return client.set(update);
} catch (JsonGenerationException e) {
logger.warn("Failed to convert to JSON: {}", value);
logger.warn("Parse exception.", e);