]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db/src/org/simantics/db/RequestProcessor.java
Working towards multiple readers.
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / RequestProcessor.java
index 68af4664b856442d0b1c7e38ed27d17cb5f74293..5cc0157a3fc9b2ed313ca81f011a3954db319ce6 100644 (file)
@@ -12,6 +12,7 @@
 package org.simantics.db;
 
 import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.procedure.Procedure;
 import org.simantics.db.request.ReadInterface;
 import org.simantics.db.request.WriteInterface;
 
@@ -61,9 +62,21 @@ import org.simantics.db.request.WriteInterface;
  * @see MergingGraphRequestProcessor
  * @see AsyncRequestProcessor
  */
-public interface RequestProcessor extends AsyncRequestProcessor, RequestProcessorSpecific {
+public interface RequestProcessor extends RequestProcessorSpecific, ServiceLocator {
+
+       Resource getRootLibrary();
+       
+    /**
+     * @return the {@link Session} for which this processor is based on.
+     */
+    Session getSession();
 
     <T> T sync(ReadInterface<T> r) throws DatabaseException;
     <T> T sync(WriteInterface<T> r) throws DatabaseException;
     
+    <T> void async(WriteInterface<T> r);
+    <T> void async(WriteInterface<T> r, Procedure<T> procedure);
+    
+    Object getModificationCounter();
+    
 }