import org.simantics.db.impl.ClusterBase;
import org.simantics.db.impl.ClusterI;
import org.simantics.db.service.ClusterUID;
+import org.slf4j.LoggerFactory;
+
+import gnu.trove.map.hash.TIntIntHashMap;
-import gnu.trove.TIntIntHashMap;
public class ClusterLRU extends LRU<ClusterUID, ClusterInfo> {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ClusterLRU.class);
+
final private BijectionMap<ClusterUID, Integer> clusterMapping = new BijectionMap<ClusterUID, Integer>();
public ClusterLRU(ClusterManager manager, String identifier, Path writeDir) {
synchronized(map) {
value = map.get(key);
if(key != value) {
- System.err.println("Read failed for real " + key + " vs. " + value);
+ LOGGER.warn("Read failed for real " + key + " vs. " + value);
}
//ws.release();
}
write.join();
read.join();
- long duration = System.nanoTime() - start;
- System.err.println("took " + 1e-9*duration + "s.");
-
+ if (LOGGER.isDebugEnabled()) {
+ long duration = System.nanoTime() - start;
+ LOGGER.debug("took " + 1e-9*duration + "s.");
+ }
}
}