public class UnsupportedProtocolVersionException extends DriverException
The only time when this is returned directly to the client (wrapped in a AllNodesFailedException) is at initialization. If it happens later when the driver is already
connected, it is just logged an the corresponding node is forced down.
| Constructor and Description |
|---|
UnsupportedProtocolVersionException(EndPoint endPoint,
String message,
List<ProtocolVersion> attemptedVersions) |
| Modifier and Type | Method and Description |
|---|---|
DriverException |
copy()
Copy the exception.
|
static UnsupportedProtocolVersionException |
forNegotiation(EndPoint endPoint,
List<ProtocolVersion> attemptedVersions) |
static UnsupportedProtocolVersionException |
forSingleAttempt(EndPoint endPoint,
ProtocolVersion attemptedVersion) |
List<ProtocolVersion> |
getAttemptedVersions()
The versions that were attempted.
|
EndPoint |
getEndPoint()
The address of the node that threw the error.
|
getExecutionInfo, setExecutionInfoaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic UnsupportedProtocolVersionException(@Nullable
EndPoint endPoint,
@NonNull
String message,
@NonNull
List<ProtocolVersion> attemptedVersions)
@NonNull public static UnsupportedProtocolVersionException forSingleAttempt(@NonNull EndPoint endPoint, @NonNull ProtocolVersion attemptedVersion)
@NonNull public static UnsupportedProtocolVersionException forNegotiation(@NonNull EndPoint endPoint, @NonNull List<ProtocolVersion> attemptedVersions)
@Nullable public EndPoint getEndPoint()
@NonNull public List<ProtocolVersion> getAttemptedVersions()
@NonNull public DriverException copy()
DriverExceptionThis 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).
copy in class DriverExceptionCopyright © 2017–2025. All rights reserved.