/*******************************************************************************
- * 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
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;
* @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();
+
}