Skip to content

Commit 9b2abc4

Browse files
author
Zhen Li
committed
Some cleanup on the API
Made rx transaction functions to return `? extends Publisher` to allow users to keep using publishers returned by their reactive libs. Removed unused round-robin load balancing strategy.
1 parent 449fc2b commit 9b2abc4

File tree

3 files changed

+4
-214
lines changed

3 files changed

+4
-214
lines changed

driver/src/main/java/org/neo4j/driver/internal/cluster/loadbalancing/RoundRobinLoadBalancingStrategy.java

Lines changed: 0 additions & 70 deletions
This file was deleted.

driver/src/main/java/org/neo4j/driver/reactive/RxSession.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public interface RxSession extends RxStatementRunner
8383
* publisher can be completed exceptionally if given work or commit fails.
8484
*
8585
*/
86-
<T> Publisher<T> readTransaction( RxTransactionWork<Publisher<T>> work );
86+
<T> Publisher<T> readTransaction( RxTransactionWork<? extends Publisher<T>> work );
8787

8888
/**
8989
* Execute given unit of reactive work in a {@link AccessMode#READ read} reactive transaction with
@@ -106,7 +106,7 @@ public interface RxSession extends RxStatementRunner
106106
* publisher can be completed exceptionally if given work or commit fails.
107107
*
108108
*/
109-
<T> Publisher<T> readTransaction( RxTransactionWork<Publisher<T>> work, TransactionConfig config );
109+
<T> Publisher<T> readTransaction( RxTransactionWork<? extends Publisher<T>> work, TransactionConfig config );
110110

111111
/**
112112
* Execute given unit of reactive work in a {@link AccessMode#WRITE write} reactive transaction.
@@ -127,7 +127,7 @@ public interface RxSession extends RxStatementRunner
127127
* publisher can be completed exceptionally if given work or commit fails.
128128
*
129129
*/
130-
<T> Publisher<T> writeTransaction( RxTransactionWork<Publisher<T>> work );
130+
<T> Publisher<T> writeTransaction( RxTransactionWork<? extends Publisher<T>> work );
131131

132132
/**
133133
* Execute given unit of reactive work in a {@link AccessMode#WRITE write} reactive transaction with
@@ -150,7 +150,7 @@ public interface RxSession extends RxStatementRunner
150150
* publisher can be completed exceptionally if given work or commit fails.
151151
*
152152
*/
153-
<T> Publisher<T> writeTransaction( RxTransactionWork<Publisher<T>> work, TransactionConfig config );
153+
<T> Publisher<T> writeTransaction( RxTransactionWork<? extends Publisher<T>> work, TransactionConfig config );
154154

155155
/**
156156
* Run a statement with parameters in an auto-commit transaction with specified {@link TransactionConfig} and return a reactive result stream.

driver/src/test/java/org/neo4j/driver/internal/cluster/loadbalancing/RoundRobinLoadBalancingStrategyTest.java

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)