diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2019-11-15 15:46:53 +0100 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2019-11-15 15:46:53 +0100 |
commit | 122cd67070e9475eea509a1d6550ce1f43e4bfb6 (patch) | |
tree | dc503697af815d0878476380b327d01e61184127 /src/main/java/pl/edu/mimuw/cloudatlas/api | |
parent | ea47b82d7553012b39f6ab6a836a1832da40ca4e (diff) |
Add API definition
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/api')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/api/Api.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/api/Api.java b/src/main/java/pl/edu/mimuw/cloudatlas/api/Api.java new file mode 100644 index 0000000..c5a4581 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/api/Api.java @@ -0,0 +1,38 @@ +package pl.edu.mimuw.cloudatlas.api; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import pl.edu.mimuw.cloudatlas.model.Value; +import pl.edu.mimuw.cloudatlas.model.ValueContact; +import pl.edu.mimuw.cloudatlas.model.AttributesMap; + +/** + * + * from: https://www.mimuw.edu.pl/~iwanicki/courses/ds/2019/labs/04/ + + Returning the set of zones on which the agent stores information. + Returning the values of attributes of a given zone. + Installing a query on the agent. We assume that the query is installed in all zones of the agent. + Uninstalling a query on the agent. Again, the query is uninstalled from all zones of the agent. + Setting the values of attributes of a given zone (this operation should be allowed only for the singleton zones). + Setting the fallback contacts. These contacts are stored aside from the ZMIs, in a dedicated set. Each invocation of the function overrides this set. + + */ +import java.util.Set; + +public interface Api extends Remote { + + public Set<String> getZoneSet() throws RemoteException; + + public AttributesMap getZoneAttributeValue(String zoneName) throws RemoteException; + + public void installQuery(String queryName, String query) throws RemoteException; + + public void uninstallQuery(String queryName) throws RemoteException; + + public void setAttributeValue(String attributeName, Value value) throws RemoteException; + + public void setFallbackContacts(Set<ValueContact> serializedContacts) throws RemoteException; + +} |