diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-13 20:56:41 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-13 20:56:41 +0100 |
commit | 23b8714b29816b608cb3aa330b6e93610e107126 (patch) | |
tree | 4cb9bf4d64ec1d2987ec4b44692fdd42280ab91d /src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java | |
parent | 81d1abbbad1f1e9c7774c7162b23fc804f7989a3 (diff) |
Create simple query data structure so that RMI doesn't blow up
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java | 7 |
1 files changed, 4 insertions, 3 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 bf75210..0bf4338 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java @@ -22,6 +22,7 @@ import pl.edu.mimuw.cloudatlas.interpreter.Main; import pl.edu.mimuw.cloudatlas.interpreter.QueryResult; import pl.edu.mimuw.cloudatlas.model.*; import pl.edu.mimuw.cloudatlas.api.Api; +import pl.edu.mimuw.cloudatlas.querysigner.QueryData; import pl.edu.mimuw.cloudatlas.querysigner.QueryUtils; public class NewApiImplementation implements Api { @@ -80,13 +81,13 @@ public class NewApiImplementation implements Api { } } - public void installQuery(String name, ValueQuery query) throws RemoteException { + public void installQuery(String name, QueryData query) throws RemoteException { QueryUtils.validateQueryName(name); try { Attribute attributeName = new Attribute(name); ValueTime timestamp = new ValueTime(System.currentTimeMillis()); Map<Attribute, Entry<ValueQuery, ValueTime>> queries = new HashMap(); - queries.put(attributeName, new SimpleImmutableEntry(query, timestamp)); + queries.put(attributeName, new SimpleImmutableEntry(new ValueQuery(query), timestamp)); UpdateQueriesMessage message = new UpdateQueriesMessage("", 0, queries); eventBus.addMessage(message); } catch (Exception e) { @@ -94,7 +95,7 @@ public class NewApiImplementation implements Api { } } - public void uninstallQuery(String queryName, ValueQuery query) throws RemoteException { + public void uninstallQuery(String queryName, QueryData query) throws RemoteException { QueryUtils.validateQueryName(queryName); try { Attribute attributeName = new Attribute(queryName); |