]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySupport.java
QueryListening sync is slow
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / QuerySupport.java
index 10842cf3ce693ad8440ac57dc69cf36d87371706..3071c30c042d8730799004eec9d10b7168b70fd4 100644 (file)
@@ -1,67 +1,68 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.db.impl.query;\r
-\r
-import java.io.InputStream;\r
-\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.Session;\r
-import org.simantics.db.VirtualGraph;\r
-import org.simantics.db.exception.ResourceNotFoundException;\r
-import org.simantics.db.impl.graph.ReadGraphImpl;\r
-\r
-public interface QuerySupport extends ResourceTranslator {\r
-\r
-       Session getSession();\r
-       \r
-       boolean isImmutable(int id);\r
-       long getClusterId(int id);\r
-       int getId(Resource resource);\r
-       Resource getResource(int id);\r
-       \r
-    boolean resume(ReadGraphImpl graph);\r
-       void dirtyPrimitives();\r
-       void aboutToRead();\r
-       \r
-       int getSingleInstance(int subject);\r
-       int getSingleSuperrelation(int subject);\r
-       int getFunctionalObject(int subject, int predicate);\r
-       boolean getObjects(ReadGraphImpl graph, int subject, int predicate, IntProcedure procedure);\r
-    \r
-       org.simantics.db.DirectStatements getStatements(ReadGraphImpl graph, final int subject, QueryProcessor processor, boolean ignoreVirtual);\r
-    \r
-    void getPredicates(ReadGraphImpl graph, int subject, IntProcedure procedure);\r
-    byte[] getValue(ReadGraphImpl graph, int resource);\r
-    InputStream getValueStream(ReadGraphImpl graph, int resource);\r
-    \r
-    void requestCluster(ReadGraphImpl graph, long clusterId, Runnable r);\r
-    \r
-    void ensureLoaded(final ReadGraphImpl graph, final int subject, final int predicate);\r
-    void ensureLoaded(final ReadGraphImpl graph, final int subject);\r
-    boolean isLoaded(int subject);\r
-    \r
-       int getBuiltin(String uri);\r
-\r
-       @Deprecated // Use SerialisationSupport instead\r
-       int getRandomAccessReference(String id) throws ResourceNotFoundException;\r
-\r
-    void checkTasks();\r
-    void ceased(int thread);\r
-    Object getLock();\r
-    \r
-    VirtualGraph getProvider(int subject, int predicate, int object);\r
-    VirtualGraph getProvider(int subject, int predicate);\r
-    VirtualGraph getValueProvider(int subject);\r
-    \r
-    void exit(Throwable t);\r
-    \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.db.impl.query;
+
+import java.io.InputStream;
+
+import org.simantics.db.Resource;
+import org.simantics.db.Session;
+import org.simantics.db.VirtualGraph;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.exception.ResourceNotFoundException;
+import org.simantics.db.impl.graph.ReadGraphImpl;
+
+public interface QuerySupport extends ResourceTranslator {
+
+       Session getSession();
+       
+       boolean isImmutable(int id);
+       long getClusterId(int id);
+       int getId(Resource resource);
+       Resource getResource(int id);
+       
+    boolean resume(ReadGraphImpl graph);
+       void dirtyPrimitives();
+       void aboutToRead();
+       
+       int getSingleInstance(int subject);
+       int getSingleSuperrelation(int subject);
+       int getFunctionalObject(int subject, int predicate);
+       boolean getObjects(ReadGraphImpl graph, int subject, int predicate, IntProcedure procedure) throws DatabaseException;
+    
+       org.simantics.db.DirectStatements getStatements(ReadGraphImpl graph, final int subject, QueryProcessor processor, boolean ignoreVirtual);
+    
+    void getPredicates(ReadGraphImpl graph, int subject, IntProcedure procedure) throws DatabaseException;
+    byte[] getValue(ReadGraphImpl graph, int resource);
+    InputStream getValueStream(ReadGraphImpl graph, int resource);
+    
+    void requestCluster(ReadGraphImpl graph, long clusterId, Runnable r);
+    
+    void ensureLoaded(final ReadGraphImpl graph, final int subject, final int predicate);
+    void ensureLoaded(final ReadGraphImpl graph, final int subject);
+    boolean isLoaded(int subject);
+    
+       int getBuiltin(String uri);
+
+       @Deprecated // Use SerialisationSupport instead
+       int getRandomAccessReference(String id) throws ResourceNotFoundException;
+
+    void checkTasks();
+    void ceased(int thread);
+    Object getLock();
+    
+    VirtualGraph getProvider(int subject, int predicate, int object);
+    VirtualGraph getProvider(int subject, int predicate);
+    VirtualGraph getValueProvider(int subject);
+    
+    void exit(Throwable t);
+    
+}