m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/pl/edu')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java
index 3bedd90..52d6321 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java
@@ -114,18 +114,17 @@ public class NewApiImplementation implements Api {
}
public void uninstallQuery(String queryName) throws RemoteException {
- // uninstallQueryInHierarchy(root, new Attribute(queryName));
- }
-
- private void uninstallQueryInHierarchy(ZMI zmi, Attribute queryName) {
- /*
- if (!zmi.getSons().isEmpty()) {
- zmi.getAttributes().remove(queryName);
- for (ZMI son : zmi.getSons()) {
- uninstallQueryInHierarchy(son, queryName);
- }
+ try {
+ Attribute attributeName = new Attribute(queryName);
+ ValueTime timestamp = new ValueTime(System.currentTimeMillis());
+ Map<Attribute, Entry<ValueQuery, ValueTime>> queries = new HashMap();
+ queries.put(attributeName, new SimpleImmutableEntry(null, timestamp));
+ UpdateQueriesMessage message = new UpdateQueriesMessage("", 0, queries);
+ eventBus.addMessage(message);
+ } catch (Exception e) {
+ System.out.println("ERROR: failed to remove query");
+ throw new RemoteException("Failed to uninstall query", e);
}
- */
}
public void setAttributeValue(String zoneName, String attributeName, Value value) throws RemoteException {