int clusterKey = hashMap.size();
ClusterSmall sentinel = new ClusterSmall(clusterUID, clusterKey, ClusterTable.this, sessionImpl.clusterTranslator);
if (sentinel.clusterId != sentinel.clusterUID.second)
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
create(sentinel);
return sentinel;
}
create(proxy);
if (null != old) {
if (old.clusterKey != proxy.clusterKey)
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
if (old.clusterId != proxy.clusterId)
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
if (!old.clusterUID.equals(proxy.clusterUID))
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
}
}
private ClusterSmall freeProxy(ClusterImpl proxy) {
ClusterImpl clusterImpl = hashMap.get(proxy.clusterId);
if (null == clusterImpl)
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
// ClusterUID clusterUID = ClusterUID.make(0, proxy.clusterId);
// ClusterImpl clusterImpl2 = clusterU2I.get(clusterUID );
// if (clusterImpl != clusterImpl2)
-// throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+// throw new RuntimeDatabaseException("ClusterTable corrupted.");
if (proxy.clusterId != clusterImpl.clusterId)
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
if (proxy.clusterKey != clusterImpl.clusterKey)
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
ClusterSmall sentinel = new ClusterSmall(makeClusterUID(proxy.clusterId) , proxy.clusterKey, ClusterTable.this, sessionImpl.clusterTranslator);
return (ClusterSmall)create(sentinel);
}
void removeWriteOnlyClusters() {
for (ClusterI proxy : writeOnlyClusters) {
if (!(proxy instanceof ClusterImpl))
- throw new RuntimeDatabaseException("ClusterTable corrupted. Contact application support.");
+ throw new RuntimeDatabaseException("ClusterTable corrupted.");
clusters.freeProxy((ClusterImpl)proxy);
}
writeOnlyClusters.clear();
System.err.println("value " + cc.getValueIndex()[i] + " changed.");
}
}
- final void refreshImportance(ClusterImpl c) {
+ final synchronized void refreshImportance(ClusterImpl c) {
if (c.isWriteOnly())
return;
}
@SuppressWarnings("unchecked")
- public final <T extends ClusterI> T getClusterByResourceKey(final int resourceKey) {
+ public synchronized final <T extends ClusterI> T getClusterByResourceKey(final int resourceKey) {
int clusterKey = ClusterTraitsBase.getClusterKeyFromResourceKeyNoThrow(resourceKey);
if (ClusterTraitsBase.isVirtualClusterKey(clusterKey))
throw new RuntimeException("Tried to get a persistent cluster for a virtual resource.");