File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
driver/src/main/java/org/neo4j/driver/internal Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,16 @@ private enum State
67
67
68
68
private final Connection connection ;
69
69
private final BoltProtocol protocol ;
70
- private final NetworkSession session ;
70
+ private final BookmarksHolder bookmarksHolder ;
71
71
private final ResultCursorsHolder resultCursors ;
72
72
73
73
private volatile State state = State .ACTIVE ;
74
74
75
- public ExplicitTransaction ( Connection connection , NetworkSession session )
75
+ public ExplicitTransaction ( Connection connection , BookmarksHolder bookmarksHolder )
76
76
{
77
77
this .connection = connection ;
78
78
this .protocol = connection .protocol ();
79
- this .session = session ;
79
+ this .bookmarksHolder = bookmarksHolder ;
80
80
this .resultCursors = new ResultCursorsHolder ();
81
81
}
82
82
@@ -247,12 +247,7 @@ private CompletionStage<Void> doCommitAsync()
247
247
return failedFuture ( new ClientException ( "Transaction can't be committed. " +
248
248
"It has been rolled back either because of an error or explicit termination" ) );
249
249
}
250
- return protocol .commitTransaction ( connection )
251
- .thenApply ( newBookmarks ->
252
- {
253
- session .setBookmarks ( newBookmarks );
254
- return null ;
255
- } );
250
+ return protocol .commitTransaction ( connection ).thenAccept ( bookmarksHolder ::setBookmarks );
256
251
}
257
252
258
253
private CompletionStage <Void > doRollbackAsync ()
You can’t perform that action at this time.
0 commit comments