From 288f3c6045d8f6b1e4d9b0b02a99d76f3d3683e1 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 28 Feb 2013 16:06:40 +0100 Subject: RemoveNonStrongRefCache, as it didn't add anything to Map. --- .../c2kernel/persistency/ClusterStorageManager.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/main/java/com/c2kernel/persistency/ClusterStorageManager.java') diff --git a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java index bb5f90f..6c247b2 100644 --- a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java +++ b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.ConcurrentModificationException; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.StringTokenizer; import com.c2kernel.common.ObjectNotFoundException; @@ -16,7 +17,6 @@ import com.c2kernel.persistency.outcome.Outcome; import com.c2kernel.persistency.outcome.Viewpoint; import com.c2kernel.process.Gateway; import com.c2kernel.utils.Logger; -import com.c2kernel.utils.NonStrongRefCache; import com.c2kernel.utils.SoftCache; import com.c2kernel.utils.WeakCache; @@ -33,7 +33,7 @@ public class ClusterStorageManager { HashMap> clusterWriters = new HashMap>(); HashMap> clusterReaders = new HashMap>(); // we don't need a soft cache for the top level cache - the proxies and entities clear that when reaped - HashMap> memoryCache = new HashMap>(); + HashMap> memoryCache = new HashMap>(); /** * Initialises all ClusterStorage handlers listed by class name in the property "ClusterStorages" @@ -130,7 +130,7 @@ public class ClusterStorageManager { * Does not look in any currently open transactions. */ public String[] getClusterContents(Integer sysKey, String path) throws ClusterStorageException { - //String[] retArr = new String[0]; + ArrayList contents = new ArrayList(); // get all readers Logger.msg(8, "ClusterStorageManager.getClusterContents() - Finding contents of "+path); @@ -161,7 +161,7 @@ public class ClusterStorageManager { public C2KLocalObject get(Integer sysKeyIntObj, String path) throws ClusterStorageException, ObjectNotFoundException { C2KLocalObject result = null; // check cache first - NonStrongRefCache sysKeyMemCache = null; + Map sysKeyMemCache = null; sysKeyMemCache = memoryCache.get(sysKeyIntObj); if (sysKeyMemCache != null) { synchronized(sysKeyMemCache) { @@ -246,7 +246,7 @@ public class ClusterStorageManager { } } // put in mem cache if that worked - NonStrongRefCache sysKeyMemCache; + Map sysKeyMemCache; if (memoryCache.containsKey(sysKeyIntObj)) sysKeyMemCache = memoryCache.get(sysKeyIntObj); else { @@ -283,7 +283,7 @@ public class ClusterStorageManager { } if (memoryCache.containsKey(sysKeyIntObj)) { - NonStrongRefCache sysKeyMemCache = memoryCache.get(sysKeyIntObj); + Map sysKeyMemCache = memoryCache.get(sysKeyIntObj); synchronized (sysKeyMemCache) { sysKeyMemCache.remove(path); } @@ -298,7 +298,7 @@ public class ClusterStorageManager { Logger.msg(7, "CSM.clearCache() - removing "+sysKeyIntObj+"/"+path); if (memoryCache.containsKey(sysKeyIntObj)) { - NonStrongRefCache sysKeyMemCache = memoryCache.get(sysKeyIntObj); + Map sysKeyMemCache = memoryCache.get(sysKeyIntObj); synchronized(sysKeyMemCache) { for (Iterator iter = sysKeyMemCache.keySet().iterator(); iter.hasNext();) { String thisPath = iter.next(); @@ -318,7 +318,7 @@ public class ClusterStorageManager { if (memoryCache.containsKey(sysKeyIntObj)) { synchronized (memoryCache) { if (Logger.doLog(6)) { - NonStrongRefCache sysKeyMemCache = memoryCache.get(sysKeyIntObj); + Map sysKeyMemCache = memoryCache.get(sysKeyIntObj); int size = sysKeyMemCache.size(); Logger.msg(6, "CSM.clearCache() - "+size+" objects to remove."); } @@ -341,7 +341,7 @@ public class ClusterStorageManager { synchronized(memoryCache) { for (Integer sysKey : memoryCache.keySet()) { Logger.msg(logLevel, "Cached Objects of Entity "+sysKey); - NonStrongRefCache sysKeyMemCache = memoryCache.get(sysKey); + Map sysKeyMemCache = memoryCache.get(sysKey); try { synchronized(sysKeyMemCache) { for (Object name : sysKeyMemCache.keySet()) { -- cgit v1.2.3