Class ClosedConnectionException

  • All Implemented Interfaces:
    Serializable

    public class ClosedConnectionException
    extends DriverException
    Thrown when the connection on which a request was executing is closed due to an unrelated event.

    For example, this can happen if the node is unresponsive and a heartbeat query failed, or if the node was forced down.

    The driver will retry these requests on the next node transparently, unless the request is not idempotent. Therefore, this exception is usually observed as part of an AllNodesFailedException.

    See Also:
    Serialized Form
    • Constructor Detail

      • ClosedConnectionException

        public ClosedConnectionException​(@NonNull
                                         String message)
      • ClosedConnectionException

        public ClosedConnectionException​(@NonNull
                                         String message,
                                         @Nullable
                                         Throwable cause)
    • Method Detail

      • copy

        @NonNull
        public DriverException copy()
        Description copied from class: DriverException
        Copy the exception.

        This returns a new exception, equivalent to the original one, except that because a new object is created in the current thread, the top-most element in the stacktrace of the exception will refer to the current thread. The original exception may or may not be included as the copy's cause, depending on whether that is deemed useful (this is left to the discretion of each implementation).

        This is intended for the synchronous wrapper methods of the driver, in order to produce a more user-friendly stack trace (that includes the line in the user code where the driver rethrew the error).

        Specified by:
        copy in class DriverException