]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ResourceTableSmall.java
Goodbye db-client.log
[simantics/platform.git] / bundles / org.simantics.db.procore / src / org / simantics / db / procore / cluster / ResourceTableSmall.java
index d72b79aa567d5d582e23e90f132c9c45edee7599..460d30dbe3fe97705d1d90f947d530410967661a 100644 (file)
@@ -14,7 +14,6 @@ package org.simantics.db.procore.cluster;
 import java.util.ArrayList;
 
 import org.simantics.db.Resource;
-import org.simantics.db.common.utils.Logger;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.impl.ClusterBase;
 import org.simantics.db.impl.ClusterI;
@@ -28,9 +27,11 @@ import org.simantics.db.impl.Table;
 import org.simantics.db.impl.TableFactory;
 import org.simantics.db.impl.TableSizeListener;
 import org.simantics.db.impl.graph.ReadGraphImpl;
-import org.simantics.db.procedure.AsyncContextMultiProcedure;
-import org.simantics.db.procedure.AsyncMultiProcedure;
+import org.simantics.db.procedure.SyncContextMultiProcedure;
+import org.simantics.db.procedure.SyncMultiProcedure;
 import org.simantics.db.procore.cluster.PredicateTable.Status;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 
@@ -201,14 +202,14 @@ public final class ResourceTableSmall extends Table<long[]> {
     }
 
     public void foreachObject(int resourceIndex, ReadGraphImpl graph,
-            AsyncMultiProcedure<Resource> procedure, ClusterSupport support, int pRef, ClusterI.CompleteTypeEnum completeType, CompleteTable ct, Modifier modifier) throws DatabaseException {
+            SyncMultiProcedure<Resource> procedure, ClusterSupport support, int pRef, ClusterI.CompleteTypeEnum completeType, CompleteTable ct, Modifier modifier) throws DatabaseException {
         int realIndex = checkIndexAndGetRealIndex(resourceIndex);
         ResourceElementSmall.foreachObject(table, realIndex, graph, procedure, support,
                 pRef, completeType, ct, modifier);
     }
 
     public <C> void foreachObject(int resourceIndex, ReadGraphImpl graph, C context,
-            AsyncContextMultiProcedure<C, Resource> procedure, ClusterSupport support, int pRef, ClusterI.CompleteTypeEnum completeType, CompleteTable ct, Modifier modifier) throws DatabaseException {
+            SyncContextMultiProcedure<C, Resource> procedure, ClusterSupport support, int pRef, ClusterI.CompleteTypeEnum completeType, CompleteTable ct, Modifier modifier) throws DatabaseException {
         int realIndex = checkIndexAndGetRealIndex(resourceIndex);
         ResourceElementSmall.foreachObject(table, realIndex, graph, context, procedure, support,
                 pRef, completeType, ct, modifier);
@@ -390,6 +391,9 @@ public final class ResourceTableSmall extends Table<long[]> {
 
 class CalculateStatementsSmall
 implements ClusterI.PredicateProcedure<CalculateStatements> {
+    
+    private static final Logger LOGGER = LoggerFactory.getLogger(CalculateStatementsSmall.class);
+    
     private ObjectTable         ot;
     private final int           sRef;
 
@@ -406,8 +410,8 @@ implements ClusterI.PredicateProcedure<CalculateStatements> {
         try {
             oIndex = ClusterTraits.statementIndexGet(oIndex);
         } catch (DatabaseException e) {
-            Logger.getDefault().logError("Missing object set for s="
-                    + sRef + " p=" + pKey, null);
+            LOGGER.error("Missing object set for s="
+                    + sRef + " p=" + pKey, e);
             return false; // continue looping
         }
         int osize = ot.getObjectSetSize(oIndex);