summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/persistency/RemoteMap.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-05-07 17:33:13 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-05-08 16:37:39 +0200
commita1f0ecbb6a2bea6aa214322c412af2f3c5ce124b (patch)
tree4d74229b6dd9cfd7ce054e06bf740b9a63a578d6 /src/main/java/com/c2kernel/persistency/RemoteMap.java
parent6dfa1bbe05a712174e937af89d5223e98d9d7d06 (diff)
Agent now extends Item, so they can have workflows. All traces of the
old 'Entity' superclasses should be removed, including proxies and paths. Very large change, breaks API compatibility with CRISTAL 2.x. Fixes #135
Diffstat (limited to 'src/main/java/com/c2kernel/persistency/RemoteMap.java')
-rw-r--r--src/main/java/com/c2kernel/persistency/RemoteMap.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/persistency/RemoteMap.java b/src/main/java/com/c2kernel/persistency/RemoteMap.java
index b36648f..9f1d8a3 100644
--- a/src/main/java/com/c2kernel/persistency/RemoteMap.java
+++ b/src/main/java/com/c2kernel/persistency/RemoteMap.java
@@ -9,10 +9,10 @@ import java.util.TreeMap;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.entity.C2KLocalObject;
-import com.c2kernel.entity.proxy.EntityProxy;
-import com.c2kernel.entity.proxy.EntityProxyObserver;
+import com.c2kernel.entity.proxy.ItemProxy;
import com.c2kernel.entity.proxy.MemberSubscription;
-import com.c2kernel.lookup.EntityPath;
+import com.c2kernel.entity.proxy.ProxyObserver;
+import com.c2kernel.lookup.ItemPath;
import com.c2kernel.process.Gateway;
import com.c2kernel.utils.Logger;
@@ -34,9 +34,9 @@ public class RemoteMap<V extends C2KLocalObject> extends TreeMap<String, V> impl
private String mPath = "";
Object keyLock = null;
TransactionManager storage;
- EntityProxyObserver<V> listener;
+ ProxyObserver<V> listener;
Comparator<String> comp;
- EntityProxy source;
+ ItemProxy source;
Object mLocker; // if this remote map will participate in a transaction
public RemoteMap(int sysKey, String path, Object locker) {
@@ -68,7 +68,7 @@ public class RemoteMap<V extends C2KLocalObject> extends TreeMap<String, V> impl
} catch (NumberFormatException e) {}
storage = Gateway.getStorage();
- listener = new EntityProxyObserver<V>() {
+ listener = new ProxyObserver<V>() {
@Override
public void add(V obj) {
synchronized (this) {
@@ -88,7 +88,7 @@ public class RemoteMap<V extends C2KLocalObject> extends TreeMap<String, V> impl
};
try {
- source = Gateway.getProxyManager().getProxy(new EntityPath(sysKey));
+ source = Gateway.getProxyManager().getProxy(new ItemPath(sysKey));
source.subscribe(new MemberSubscription<V>(listener, path, false));
} catch (Exception ex) {
Logger.error("Error subscribing to remote map. Changes will not be received");