public static final class DriverTimeoutException.NodeDiagnostics extends Object
Fields:
getNodeState(): the state of the node (UP, DOWN, etc.) at timeout time.
getNodeDistance(): the distance assigned to the node by the load-balancing
policy (LOCAL, REMOTE, or IGNORED).
getDatacenter(): the datacenter the node belongs to.
getChannelInFlight(): requests currently awaiting a response on the specific
connection used for this request.
getPoolSize(): number of active connections in the pool (DriverTimeoutException.UNAVAILABLE if
the pool was already removed).
getPoolInFlight(): total in-flight across all connections to this host (DriverTimeoutException.UNAVAILABLE if the pool was already removed).
getPoolAvailableIds(): remaining stream IDs available to send new requests; a
low value indicates pool contention (DriverTimeoutException.UNAVAILABLE if pool was already removed).
getPoolOrphanedIds(): stream IDs from previously timed-out or cancelled requests
that cannot be released yet; a high value indicates stale stream ID accumulation (DriverTimeoutException.UNAVAILABLE if pool was already removed).
Diagnosing failure modes:
poolAvailableIds near zero → pool contention; requests queuing inside the driver
before reaching the server.
poolAvailableIds normal + high channelInFlight → server is slow; requests
were sent but not answered within the timeout.
poolOrphanedIds → previous timeouts consumed stream IDs that the driver is
still waiting to reclaim.
poolSize below expected → pool is degraded; some connections have been lost.
nodeState DOWN or FORCED_DOWN → node is known to be unavailable.
| Constructor and Description |
|---|
NodeDiagnostics(EndPoint endPoint,
NodeState nodeState,
NodeDistance nodeDistance,
String datacenter,
int channelInFlight)
Creates a partial diagnostic snapshot for when the pool was unavailable at timeout time.
|
NodeDiagnostics(EndPoint endPoint,
NodeState nodeState,
NodeDistance nodeDistance,
String datacenter,
int channelInFlight,
int poolSize,
int poolInFlight,
int poolAvailableIds,
int poolOrphanedIds)
Creates a full diagnostic snapshot (pool was available at timeout time).
|
| Modifier and Type | Method and Description |
|---|---|
int |
getChannelInFlight()
Returns the number of in-flight requests on the specific connection at timeout time, or
DriverTimeoutException.UNAVAILABLE if not available. |
String |
getDatacenter()
Returns the datacenter this node belongs to, or
null if not available. |
EndPoint |
getEndPoint()
Returns the endpoint of the node that had in-flight requests at timeout time.
|
NodeDistance |
getNodeDistance()
Returns the distance assigned to this node by the load-balancing policy at timeout time (e.g.
|
NodeState |
getNodeState()
Returns the state of the node at timeout time (e.g.
|
int |
getPoolAvailableIds()
Returns the number of remaining stream IDs available in the pool at timeout time, or
DriverTimeoutException.UNAVAILABLE if the pool was no longer available. |
int |
getPoolInFlight()
Returns the total number of in-flight requests across all connections to this host at timeout
time, or
DriverTimeoutException.UNAVAILABLE if the pool was no longer available. |
int |
getPoolOrphanedIds()
Returns the number of orphaned stream IDs in the pool at timeout time, or
DriverTimeoutException.UNAVAILABLE if the pool was no longer available. |
int |
getPoolSize()
Returns the number of active connections in the pool at timeout time, or
DriverTimeoutException.UNAVAILABLE if the pool was no longer available. |
static DriverTimeoutException.NodeDiagnostics |
of(EndPoint endPoint,
NodeState nodeState,
NodeDistance nodeDistance,
String datacenter,
int channelInFlight,
int poolSize,
int poolInFlight,
int poolAvailableIds,
int poolOrphanedIds)
Creates a diagnostic snapshot using pre-computed pool stats.
|
String |
toString() |
public NodeDiagnostics(@NonNull
EndPoint endPoint,
@Nullable
NodeState nodeState,
@Nullable
NodeDistance nodeDistance,
@Nullable
String datacenter,
int channelInFlight,
int poolSize,
int poolInFlight,
int poolAvailableIds,
int poolOrphanedIds)
endPoint - the endpoint of the node.nodeState - the state of the node at timeout time.nodeDistance - the distance assigned to the node by the load-balancing policy.datacenter - the datacenter the node belongs to.channelInFlight - in-flight count on the specific channel.poolSize - number of active connections in the pool.poolInFlight - total in-flight across the pool for this host.poolAvailableIds - remaining stream IDs available in the pool.poolOrphanedIds - orphaned stream IDs in the pool.public NodeDiagnostics(@NonNull
EndPoint endPoint,
@Nullable
NodeState nodeState,
@Nullable
NodeDistance nodeDistance,
@Nullable
String datacenter,
int channelInFlight)
getPoolSize(), getPoolInFlight(), getPoolAvailableIds(), getPoolOrphanedIds()) will be DriverTimeoutException.UNAVAILABLE.endPoint - the endpoint of the node.nodeState - the state of the node at timeout time.nodeDistance - the distance assigned to the node by the load-balancing policy.datacenter - the datacenter the node belongs to.channelInFlight - in-flight count on the specific channel.@NonNull public static DriverTimeoutException.NodeDiagnostics of(@NonNull EndPoint endPoint, @Nullable NodeState nodeState, @Nullable NodeDistance nodeDistance, @Nullable String datacenter, int channelInFlight, int poolSize, int poolInFlight, int poolAvailableIds, int poolOrphanedIds)
DriverTimeoutException.UNAVAILABLE for pool fields when the pool was not available at
timeout time.endPoint - the endpoint of the node.nodeState - the state of the node at timeout time.nodeDistance - the distance assigned to the node by the load-balancing policy.datacenter - the datacenter the node belongs to.channelInFlight - in-flight count on the specific channel.poolSize - number of active connections in the pool, or DriverTimeoutException.UNAVAILABLE.poolInFlight - total in-flight across the pool, or DriverTimeoutException.UNAVAILABLE.poolAvailableIds - remaining stream IDs in the pool, or DriverTimeoutException.UNAVAILABLE.poolOrphanedIds - orphaned stream IDs in the pool, or DriverTimeoutException.UNAVAILABLE.@NonNull public EndPoint getEndPoint()
@Nullable public NodeState getNodeState()
null
if not available.@Nullable public NodeDistance getNodeDistance()
null if not available.@Nullable public String getDatacenter()
null if not available.public int getChannelInFlight()
DriverTimeoutException.UNAVAILABLE if not available.public int getPoolSize()
DriverTimeoutException.UNAVAILABLE if the pool was no longer available.public int getPoolInFlight()
DriverTimeoutException.UNAVAILABLE if the pool was no longer available.public int getPoolAvailableIds()
DriverTimeoutException.UNAVAILABLE if the pool was no longer available. A low value
indicates pool contention.public int getPoolOrphanedIds()
DriverTimeoutException.UNAVAILABLE if the pool was no longer available. A high value
indicates stale stream ID accumulation from previous timeouts.Copyright © 2017–1980. All rights reserved.