Skip to content

Commit 0f1c3ba

Browse files
authored
Merge pull request #367 from zhenlineo/1.2-api-doc
Added some missing API docs
2 parents 1772d1a + 93322bb commit 0f1c3ba

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,23 @@
1818
*/
1919
package org.neo4j.driver.v1;
2020

21+
/**
22+
* Used by Routing Driver to decide if a transaction should be routed to a write server or a read server in a cluster.
23+
* When running a transaction, a write transaction requires a server that supports writes.
24+
* A read transaction, on the other hand, requires a server that supports read operations.
25+
* This classification is key for routing driver to route transactions to a cluster correctly.
26+
*
27+
* While any {@link AccessMode} will be ignored while running transactions via a driver towards a single server.
28+
* As the single server serves both read and write operations at the same time.
29+
*/
2130
public enum AccessMode
2231
{
32+
/**
33+
* Use this for transactions that requires a read server in a cluster
34+
*/
2335
READ,
36+
/**
37+
* Use this for transactions that requires a write server in a cluster
38+
*/
2439
WRITE
2540
}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ public ConfigBuilder withSessionLivenessCheckTimeout( long timeout )
303303
* application seeing connection problems, and performance.
304304
* <p>
305305
* You normally should not need to tune this parameter.
306-
* This feature is turned off by default. Value {@code 0} means connections will always be tested for
306+
* No connection liveliness check is done by default.
307+
* Value {@code 0} means connections will always be tested for
307308
* validity and negative values mean connections will never be tested.
308309
*
309310
* @param value the minimum idle time in milliseconds
@@ -516,6 +517,9 @@ public enum EncryptionLevel
516517
*/
517518
public static class TrustStrategy
518519
{
520+
/**
521+
* The trust strategy that the driver supports
522+
*/
519523
public enum Strategy
520524
{
521525
@Deprecated

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,56 @@
2323
*/
2424
public interface Logger
2525
{
26+
/**
27+
* Logs errors from this driver
28+
* @param message the error message
29+
* @param cause the cause of the error
30+
*/
2631
void error( String message, Throwable cause );
2732

33+
/**
34+
* Logs information from the driver
35+
* @param message the information message
36+
* @param params parameters used in the information message
37+
*/
2838
void info( String message, Object... params );
2939

40+
/**
41+
* Logs warnings that happened during using the driver
42+
* @param message the warning message
43+
* @param params parameters used in the warning message
44+
*/
3045
void warn( String message, Object... params );
3146

47+
/**
48+
* Logs bolt messages sent and received by this driver.
49+
* It is only enabled when {@link Logger#isDebugEnabled()} returns {@code True}.
50+
* This logging level generates a lot of log entries.
51+
* @param message the bolt message
52+
* @param params parameters used in generating the bolt message
53+
*/
3254
void debug( String message, Object... params );
3355

56+
/**
57+
* Logs binary sent and received by this driver.
58+
* It is only enabled when {@link Logger#isTraceEnabled()} returns {@code True}.
59+
* This logging level generates huge amount of log entries.
60+
* @param message the bolt message in hex
61+
* @param params parameters used in generating the hex message
62+
*/
3463
void trace( String message, Object... params );
3564

65+
/**
66+
* Return true if the trace logging level is enabled.
67+
* @see Logger#trace(String, Object...)
68+
* @return true if the trace logging level is enabled.
69+
*/
3670
boolean isTraceEnabled();
3771

72+
/**
73+
* Return true if the debug level is enabled.
74+
* @see Logger#debug(String, Object...)
75+
* @return true if the debug level is enabled.
76+
*/
3877
boolean isDebugEnabled();
3978
}

0 commit comments

Comments
 (0)