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/ConnectionPoolMetrics.java
+32-40Lines changed: 32 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -22,93 +22,89 @@
22
22
23
23
publicinterfaceConnectionPoolMetrics
24
24
{
25
-
enumPoolStatus
26
-
{
27
-
OPEN, CLOSED
28
-
}
29
25
30
26
/**
31
-
* An unique name that identifies this connection pool metrics among all others
27
+
* An unique id that identifies this pool metrics.
32
28
* @return An unique name
33
29
*/
34
30
Stringid();
35
31
36
32
/**
37
-
* The status of the pool.
38
-
* @return The status of the pool.
39
-
*/
40
-
PoolStatuspoolStatus();
41
-
42
-
/**
43
-
* The amount of connections that are currently in-use (borrowed out of the pool).
33
+
* The amount of connections that are currently in-use (borrowed out of the pool). The amount can increase or decrease over time.
44
34
* @return The amount of connections that are currently in-use
45
35
*/
46
36
intinUse();
47
37
48
38
/**
49
-
* The amount of connections that are currently idle (buffered inside the pool).
39
+
* The amount of connections that are currently idle (buffered inside the pool). The amount can increase or decrease over time.
50
40
* @return The amount of connections that are currently idle.
51
41
*/
52
42
intidle();
53
43
54
44
/**
55
-
* The amount of connections that are currently waiting to be created.
45
+
* The amount of connections that are currently in the process of being created.
56
46
* The amount is increased by one when the pool noticed a request to create a new connection.
57
47
* The amount is decreased by one when the pool noticed a new connection is created successfully or failed to create.
48
+
* The amount can increase or decrease over time.
58
49
* @return The amount of connections that are waiting to be created.
59
50
*/
60
51
intcreating();
61
52
62
53
/**
63
-
* An increasing-only number to record how many connections have been created by this pool successfully since the pool is created.
54
+
* A counter to record how many connections have been successfully created with this pool since the pool is created.
55
+
* This number increases every time when a connection is successfully created.
64
56
* @return The amount of connections have ever been created by this pool.
65
57
*/
66
58
longcreated();
67
59
68
60
/**
69
-
* An increasing-only number to record how many connections have been failed to create.
70
-
* @return The amount of connections have been failed to create by this pool.
61
+
* A counter to record how many connections that have failed to be created.
62
+
* This number increases every time when a connection failed to be created.
63
+
* @return The amount of connections have failed to be created by this pool.
71
64
*/
72
65
longfailedToCreate();
73
66
74
67
/**
75
-
* An increasing-only number to record how many connections have been closed by this pool.
68
+
* A counter to record how many connections have been closed by this pool.
69
+
* This number increases every time when a connection is closed.
76
70
* @return The amount of connections have been closed by this pool.
77
71
*/
78
72
longclosed();
79
73
80
74
/**
81
-
* The current count of application requests to wait for acquiring a connection from the pool.
82
-
* The reason to wait could be waiting for creating a new connection, or waiting for a connection to be free by application when the pool is full.
83
-
* @return The current amount of application request to wait for acquiring a connection from the pool.
75
+
* The number of connection acquisition requests that are currently in progress.
76
+
* These requests can be waiting or blocked if there are no connections immediately available in the pool.
77
+
* A request will wait for a new connection to be created, or it will be blocked if the pool is at its maximum size but all connections are already in use.
78
+
* The amount can increase or decrease over time.
79
+
* @return The number of connection acquisition requests that are currently in progress.
84
80
*/
85
81
intacquiring();
86
82
87
83
/**
88
-
* An increasing-only number to record how many connections have been acquired from the pool since the pool is created.
89
-
* The connections acquired could hold either a newly created connection or a reused connection from the pool.
84
+
* A counter to record how many connections have been acquired from the pool since the pool is created.
85
+
* This number increases every time when a connection is acquired.
90
86
* @return The amount of connections that have been acquired from the pool.
91
87
*/
92
88
longacquired();
93
89
94
90
/**
95
-
* An increasing-only number to record how many times that we've failed to acquire a connection from the pool within configured maximum acquisition timeout
91
+
* A counter to record how many times that we've failed to acquire a connection from the pool within configured maximum acquisition timeout
96
92
* set by {@link Config.ConfigBuilder#withConnectionAcquisitionTimeout(long, TimeUnit)}.
97
-
* The connection acquired could hold either a newly created connection or a reused connection from the pool.
93
+
* This number increases every time when a connection is timed out when acquiring.
98
94
* @return The amount of failures to acquire a connection from the pool within maximum connection acquisition timeout.
99
95
*/
100
96
longtimedOutToAcquire();
101
97
102
98
/**
103
-
* The total acquisition time in milliseconds of all connection acquisition requests since the pool is created.
99
+
* A counter to record the total acquisition time in milliseconds of all connection acquisition requests since the pool is created.
100
+
* This number increases every time when a connection is acquired.
104
101
* See {@link ConnectionPoolMetrics#acquired()} for the total amount of connection acquired since the driver is created.
105
102
* The average acquisition time can be calculated using the code below:
0 commit comments