Skip to content

Commit bc68e85

Browse files
committed
Deprecate Session#reset()
1 parent c47aa01 commit bc68e85

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

driver/src/main/java/org/neo4j/driver/v1/Session.java

+9
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,16 @@ public interface Session extends Resource, StatementRunner
116116
* any statement that is currently executing and ignores any subsequently queued statements. Following
117117
* the reset, the current transaction will have been rolled back and any outstanding failures will
118118
* have been acknowledged.
119+
*
120+
* @deprecated This method should not be used and violates the expected usage pattern of {@link Session} objects.
121+
* They are expected to be not thread-safe and should not be shared between thread. However this method is only
122+
* useful when {@link Session} object is passed to another monitoring thread that calls it when appropriate.
123+
* It is not useful when {@link Session} is used in a single thread because in this case {@link #close()}
124+
* can be used. Since version 3.1, Neo4j database allows users to specify maximum transaction execution time and
125+
* contains procedures to list and terminate running queries. These functions should be used instead of calling
126+
* this method.
119127
*/
128+
@Deprecated
120129
void reset();
121130

122131
/**

0 commit comments

Comments
 (0)