]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db/src/org/simantics/db/RequestProcessor.java
Multiple reader thread support for db client
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / RequestProcessor.java
index 68af4664b856442d0b1c7e38ed27d17cb5f74293..5e818cb995c32408a9f04377c0b0885767d95513 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2018 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
@@ -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();
+
 }