You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/async/AsyncTransaction.java
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,9 @@
23
23
importjava.util.concurrent.Executor;
24
24
importjava.util.function.Function;
25
25
26
-
importorg.neo4j.driver.Session;
27
26
importorg.neo4j.driver.Query;
28
27
importorg.neo4j.driver.QueryRunner;
28
+
importorg.neo4j.driver.Session;
29
29
30
30
/**
31
31
* Logical container for an atomic unit of work.
@@ -90,4 +90,12 @@ public interface AsyncTransaction extends AsyncQueryRunner
90
90
* be completed exceptionally when rollback fails.
91
91
*/
92
92
CompletionStage<Void> rollbackAsync();
93
+
94
+
/**
95
+
* Close the transaction. If the transaction has been {@link #commitAsync() committed} or {@link #rollbackAsync() rolled back}, the close is optional and no
96
+
* operation is performed. Otherwise, the transaction will be rolled back by default by this method.
97
+
*
98
+
* @return new {@link CompletionStage} that gets completed with {@code null} when close is successful, otherwise it gets completed exceptionally.
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/reactive/RxTransaction.java
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -41,11 +41,19 @@ public interface RxTransaction extends RxQueryRunner
41
41
<T> Publisher<T> commit();
42
42
43
43
/**
44
-
* Rolls back the transaction.
45
-
* It completes without publishing anything if transaction is rolled back successfully.
46
-
* Otherwise, errors when there is any error to roll back.
44
+
* Rolls back the transaction. It completes without publishing anything if transaction is rolled back successfully. Otherwise, errors when there is any
45
+
* error to roll back.
46
+
*
47
47
* @param <T> makes it easier to be chained after other publishers.
48
48
* @return an empty publisher.
49
49
*/
50
50
<T> Publisher<T> rollback();
51
+
52
+
/**
53
+
* Close the transaction. If the transaction has been {@link #commit() committed} or {@link #rollback() rolled back}, the close is optional and no operation
54
+
* is performed. Otherwise, the transaction will be rolled back by default by this method.
55
+
*
56
+
* @return new {@link Publisher} that gets completed when close is successful, otherwise an error is signalled.
0 commit comments