]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/IndexedRelations.java
Add locking for IndexUtils.flushIndexCaches
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / genericrelation / IndexedRelations.java
index c334691d34130696df26c16f6dbfc18349031090..a7b08deb3290775e723d830f8a6f36588ee579e2 100644 (file)
@@ -18,6 +18,7 @@ import java.util.Map;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.simantics.db.RequestProcessor;
 import org.simantics.db.Resource;
+import org.simantics.db.Session;
 import org.simantics.db.layer0.adapter.GenericRelation;
 
 /**
@@ -98,4 +99,16 @@ public interface IndexedRelations {
 
     public void fullRebuild(IProgressMonitor monitor, RequestProcessor processor) throws IndexException;
 
+    /**
+     * Flush any memory-based index caches to disk and close down any resources
+     * related to each separate index.
+     * 
+     * Must be invoked outside of any database transactions.
+     * 
+     * @param monitor
+     * @param processor
+     * @throws IndexException
+     */
+    public void flush(IProgressMonitor monitor, Session session) throws IndexException;
+
 }