X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2Flru%2FClusterLRU.java;h=e94abf7f208379efbc739a212a7338a545e5babe;hp=ecc016723a6000f12bfec0e1dad9697d633c625d;hb=1dfeb7d5c49b1391cd9d877e1eddab18995cb151;hpb=c13c4179bda758e77fe1f2032d3c4268bb9e3120 diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterLRU.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterLRU.java index ecc016723..e94abf7f2 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterLRU.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterLRU.java @@ -15,12 +15,15 @@ import org.simantics.db.exception.DatabaseException; 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; public class ClusterLRU extends LRU { + private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ClusterLRU.class); + final private BijectionMap clusterMapping = new BijectionMap(); public ClusterLRU(ClusterManager manager, String identifier, Path writeDir) { @@ -284,7 +287,7 @@ public class ClusterLRU extends LRU { 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(); } @@ -302,9 +305,10 @@ public class ClusterLRU extends LRU { 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."); + } } }