diff options
Diffstat (limited to 'source/com/c2kernel/persistency/ClusterStorageManager.java')
| -rw-r--r-- | source/com/c2kernel/persistency/ClusterStorageManager.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/com/c2kernel/persistency/ClusterStorageManager.java b/source/com/c2kernel/persistency/ClusterStorageManager.java index b4515e0..756ac4d 100644 --- a/source/com/c2kernel/persistency/ClusterStorageManager.java +++ b/source/com/c2kernel/persistency/ClusterStorageManager.java @@ -8,8 +8,10 @@ import java.util.StringTokenizer; import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.entity.C2KLocalObject;
+import com.c2kernel.entity.agent.JobList;
import com.c2kernel.entity.proxy.EntityProxyManager;
import com.c2kernel.entity.proxy.ProxyMessage;
+import com.c2kernel.events.History;
import com.c2kernel.persistency.outcome.Outcome;
import com.c2kernel.persistency.outcome.Viewpoint;
import com.c2kernel.process.Gateway;
@@ -163,7 +165,7 @@ public class ClusterStorageManager { /** Internal get method. Retrieves clusters from ClusterStorages & maintains the memory cache */
public C2KLocalObject get(Integer sysKeyIntObj, String path) throws ClusterStorageException, ObjectNotFoundException {
- C2KLocalObject result;
+ C2KLocalObject result = null;
// check cache first
SoftCache<String, C2KLocalObject> sysKeyMemCache = null;
if (memoryCache.containsKey(sysKeyIntObj)) {
@@ -189,6 +191,21 @@ public class ClusterStorageManager { return data;
}
}
+
+ // deal out top level remote maps
+ if (path.indexOf('/') == -1) {
+ if (path.equals(ClusterStorage.HISTORY))
+ result = new History(sysKeyIntObj, null);
+ if (path.equals(ClusterStorage.JOB))
+ result = new JobList(sysKeyIntObj, null);
+ if (result!=null) {
+ synchronized(sysKeyMemCache) {
+ sysKeyMemCache.put(path, result);
+ }
+ return result;
+ }
+
+ }
// else try each reader in turn until we find it
ArrayList<ClusterStorage> readers = findStorages(ClusterStorage.getClusterType(path), false);
|
