Class DriverTimeoutException.NodeDiagnostics

  • Enclosing class:
    DriverTimeoutException

    public static final class DriverTimeoutException.NodeDiagnostics
    extends Object
    Per-node diagnostic snapshot captured at timeout time.

    Fields:

    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.
    • High 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 Detail

      • NodeDiagnostics

        public NodeDiagnostics​(@NonNull
                               EndPoint endPoint,
                               @Nullable
                               NodeState nodeState,
                               @Nullable
                               NodeDistance nodeDistance,
                               @Nullable
                               String datacenter,
                               int channelInFlight,
                               int poolSize,
                               int poolInFlight,
                               int poolAvailableIds,
                               int poolOrphanedIds)
        Creates a full diagnostic snapshot (pool was available at timeout time).
        Parameters:
        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.
      • NodeDiagnostics

        public NodeDiagnostics​(@NonNull
                               EndPoint endPoint,
                               @Nullable
                               NodeState nodeState,
                               @Nullable
                               NodeDistance nodeDistance,
                               @Nullable
                               String datacenter,
                               int channelInFlight)
        Creates a partial diagnostic snapshot for when the pool was unavailable at timeout time. The pool-related fields (getPoolSize(), getPoolInFlight(), getPoolAvailableIds(), getPoolOrphanedIds()) will be DriverTimeoutException.UNAVAILABLE.
        Parameters:
        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.
    • Method Detail

      • getEndPoint

        @NonNull
        public EndPoint getEndPoint()
        Returns the endpoint of the node that had in-flight requests at timeout time.
      • getNodeState

        @Nullable
        public NodeState getNodeState()
        Returns the state of the node at timeout time (e.g. UP, DOWN, FORCED_DOWN), or null if not available.
      • getNodeDistance

        @Nullable
        public NodeDistance getNodeDistance()
        Returns the distance assigned to this node by the load-balancing policy at timeout time (e.g. LOCAL, REMOTE, IGNORED), or null if not available.
      • getDatacenter

        @Nullable
        public String getDatacenter()
        Returns the datacenter this node belongs to, or null if not available.
      • getChannelInFlight

        public int getChannelInFlight()
        Returns the number of in-flight requests on the specific connection at timeout time, or DriverTimeoutException.UNAVAILABLE if not available.
      • getPoolSize

        public int getPoolSize()
        Returns the number of active connections in the pool at timeout time, or DriverTimeoutException.UNAVAILABLE if the pool was no longer available.
      • getPoolInFlight

        public 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.
      • getPoolAvailableIds

        public 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. A low value indicates pool contention.
      • getPoolOrphanedIds

        public 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. A high value indicates stale stream ID accumulation from previous timeouts.