diff options
Diffstat (limited to 'src/main/java/com/c2kernel/persistency')
| -rw-r--r-- | src/main/java/com/c2kernel/persistency/ClusterStorageManager.java | 10 |
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)
|
