import java.io.ByteArrayInputStream;
import java.io.InputStream;
+import java.util.function.Consumer;
import org.simantics.db.Resource;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.impl.TableHeader;
import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.impl.query.QueryProcessor;
-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.service.ClusterUID;
-import org.simantics.utils.datastructures.Callback;
import fi.vtt.simantics.procore.DebugPolicy;
import fi.vtt.simantics.procore.internal.ClusterChange;
this.clusterMap = new ClusterMap(foreignTable, flatTable);
this.clusterSupport = support;
this.clusterBits = ClusterTraitsBase.getClusterBits(clusterKey);
- this.importance = clusterTable.timeCounter();
+ this.importance = -clusterTable.timeCounter();
clusterTable.markImmutable(this, getImmutable());
}
void analyse() {
return objectTable.getSingleObject(objectIndex, support, this);
}
- public void forObjects(int resourceKey, int predicateKey, int objectIndex, QueryProcessor processor, ReadGraphImpl graph, AsyncMultiProcedure<Resource> procedure,
+ public void forObjects(int resourceKey, int predicateKey, int objectIndex, QueryProcessor processor, ReadGraphImpl graph, SyncMultiProcedure<Resource> procedure,
ClusterSupport support) throws DatabaseException {
if (DEBUG)
System.out.println("Cluster.forObjects1: rk=" + resourceKey + " pk=" + predicateKey);
}
objectTable.foreachObject(graph, objectIndex, procedure, this);
}
- public <C> void forObjects(int resourceKey, int predicateKey, int objectIndex, QueryProcessor processor, ReadGraphImpl graph, C context, AsyncContextMultiProcedure<C, Resource> procedure,
+ public <C> void forObjects(int resourceKey, int predicateKey, int objectIndex, QueryProcessor processor, ReadGraphImpl graph, C context, SyncContextMultiProcedure<C, Resource> procedure,
ClusterSupport support) throws DatabaseException {
if (DEBUG)
System.out.println("Cluster.forObjects1: rk=" + resourceKey + " pk=" + predicateKey);
@Override
public void forObjects(ReadGraphImpl graph, int resourceKey,
- int predicateKey, AsyncMultiProcedure<Resource> procedure)
+ int predicateKey, SyncMultiProcedure<Resource> procedure)
throws DatabaseException {
SessionImplSocket session = (SessionImplSocket)graph.getSession();
}
@Override
- public void load(Callback<DatabaseException> r) {
+ public void load(Consumer<DatabaseException> r) {
throw new Error("Not supported.");
}