]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.project/src/org/simantics/project/SessionDescriptor.java
Improve startup time for fresh or rollback'd session in index writing
[simantics/platform.git] / bundles / org.simantics.project / src / org / simantics / project / SessionDescriptor.java
diff --git a/bundles/org.simantics.project/src/org/simantics/project/SessionDescriptor.java b/bundles/org.simantics.project/src/org/simantics/project/SessionDescriptor.java
new file mode 100644 (file)
index 0000000..3043479
--- /dev/null
@@ -0,0 +1,27 @@
+package org.simantics.project;
+
+import org.simantics.db.Session;
+
+/**
+ * @author Jani Simomaa
+ * @since 1.34.0
+ */
+public class SessionDescriptor {
+
+    private final Session session;
+    private final boolean fresh;
+
+    public SessionDescriptor(Session session, boolean fresh) {
+        this.session = session;
+        this.fresh = fresh;
+    }
+
+    public Session getSession() {
+        return session;
+    }
+
+    public boolean isFreshDatabase() {
+        return fresh;
+    }
+
+}
\ No newline at end of file