summaryrefslogtreecommitdiff
path: root/same/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/main')
-rw-r--r--same/src/main/java/com/orbekk/same/MasterServiceImpl.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/same/src/main/java/com/orbekk/same/MasterServiceImpl.java b/same/src/main/java/com/orbekk/same/MasterServiceImpl.java
index 2101de8..6779702 100644
--- a/same/src/main/java/com/orbekk/same/MasterServiceImpl.java
+++ b/same/src/main/java/com/orbekk/same/MasterServiceImpl.java
@@ -78,9 +78,13 @@ public class MasterServiceImpl implements MasterService, UrlReceiver, Runnable {
@Override
- public boolean updateStateRequest(String component, String newData, long revision) {
- // TODO Auto-generated method stub
- return false;
+ public synchronized boolean updateStateRequest(String component,
+ String newData, long revision) {
+ boolean updated = state.update(component, newData, revision);
+ if (updated) {
+ notifyAll();
+ }
+ return updated;
}
@Override