tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [1/6] tinkerpop git commit: Allow for custom graph instantiations/closings
Date Mon, 17 Apr 2017 13:30:12 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 5ff3e4333 -> 5282ad7dd


Allow for custom graph instantiations/closings

This allows an implementor to supply a custom openGraph function to
return a newly instantiated graph object, and similarly do the same to
close a graph object, while doing so through the graphManager for
reference tracking.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4f9f90b9
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4f9f90b9
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4f9f90b9

Branch: refs/heads/tp32
Commit: 4f9f90b995aacba344d0b4c54ef2600f66fcbb48
Parents: 67471d1
Author: dpitera <dpitera@us.ibm.com>
Authored: Wed Mar 15 15:31:45 2017 -0400
Committer: dpitera <dpitera@us.ibm.com>
Committed: Mon Mar 27 13:38:16 2017 -0400

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/server/GraphManager.java    | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4f9f90b9/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GraphManager.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GraphManager.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GraphManager.java
index 473127e..18ef175 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GraphManager.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GraphManager.java
@@ -25,6 +25,7 @@ import org.apache.tinkerpop.gremlin.structure.Transaction;
 import javax.script.Bindings;
 import java.util.Map;
 import java.util.Set;
+import java.util.function.Supplier;
 
 public interface GraphManager {
     /**
@@ -93,4 +94,14 @@ public interface GraphManager {
      * Selectively commit transactions on the specified graphs or the graphs of traversal
sources.
      */
     public void commit(final Set<String> graphSourceNamesToCloseTxOn);
+
+    /**
+     * Implementation that allows for custom graph-opening implementations.
+     */
+    public Graph openGraph(String graphName, Supplier<Graph> supplier);
+
+    /**
+     * Implementation that allows for custom graph-closing implementations.
+     */
+    public void closeGraph(Graph graph);
 }


Mime
View raw message