summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/persistency
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2012-06-26 12:41:56 +0200
committerAndrew Branson <andrew.branson@cern.ch>2012-06-26 12:41:56 +0200
commit6d8c74f97fe4289a984bdc6bd635c71653d5421c (patch)
tree35a028339a549d457bbf116a5614b6c59e850c1d /src/main/java/com/c2kernel/persistency
parente18629474efa8848d07404c8c4131489a225fa59 (diff)
Refactored GUI into separate module
Diffstat (limited to 'src/main/java/com/c2kernel/persistency')
-rw-r--r--src/main/java/com/c2kernel/persistency/ClusterStorageManager.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
index 756ac4d..540b807 100644
--- a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
+++ b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
@@ -27,12 +27,11 @@ import com.c2kernel.utils.SoftCache;
*/
public class ClusterStorageManager {
HashMap<String, ClusterStorage> allStores = new HashMap<String, ClusterStorage>();
- String[] clusterPriority;
+ String[] clusterPriority = new String[0];
HashMap<String, ArrayList<ClusterStorage>> clusterWriters = new HashMap<String, ArrayList<ClusterStorage>>();
HashMap<String, ArrayList<ClusterStorage>> clusterReaders = new HashMap<String, ArrayList<ClusterStorage>>();
// we don't need a soft cache for the top level cache - the proxies and entities clear that when reaped
HashMap<Integer, SoftCache<String, C2KLocalObject>> memoryCache = new HashMap<Integer, SoftCache<String, C2KLocalObject>>();
- boolean ready = false;
/**
* Initialises all ClusterStorage handlers listed by class name in the property "ClusterStorages"
@@ -80,7 +79,6 @@ public class ClusterStorageManager {
}
}
clusterReaders.put(ClusterStorage.ROOT, rootStores); // all storages are queried for clusters at the root level
- ready = true;
}
public void close() {
@@ -91,7 +89,6 @@ public class ClusterStorageManager {
Logger.error(ex);
}
}
- ready = false;
}
/**
@@ -100,11 +97,6 @@ public class ClusterStorageManager {
*/
private ArrayList<ClusterStorage> findStorages(String clusterType, boolean forWrite) {
- if (!ready) {
- Logger.error("ClusterStorageManager.findStorages() - called before init!");
- return null;
- }
-
// choose the right cache for readers or writers
HashMap<String, ArrayList<ClusterStorage>> cache;
if (forWrite)